rhombus-prototype icon indicating copy to clipboard operation
rhombus-prototype copied to clipboard

Eager expansion of definitions’ right-hand sides can be detected

Open usaoc opened this issue 1 year ago • 1 comments

For example, this program

#lang rhombus
block:
  def a:
    b
  def b = #false
  #false

makes the reference to b a syntax error, while this program

#lang rhombus
block:
  def a:
    #false
    b
  def b = #false
  #false

is a run-time exception, like the Racket counterpart.

usaoc avatar Jan 28 '24 10:01 usaoc

Just for the record, this trade-off is also described at https://github.com/mflatt/rhombus-prototype/blob/rhombus/rhombus/0000-rhombus.md#propagating-static-information. I think the current choice has worked ok in practice, but it seems like it will always be an issue.

mflatt avatar Jun 18 '24 15:06 mflatt