rhombus-prototype
rhombus-prototype copied to clipboard
Eager expansion of definitions’ right-hand sides can be detected
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.
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.