(Found during the writing of e7dc0d9; opening for public attention)
Currently, a let can “scope over” another def in the same block:
#lang rhombus
block:
let x = "outer"
def x = "inner"
// refers to the `let` binding, i.e., "outer"
x
This is because the let binding has an extra scope (in order to achieve “forward definition”) compared to the def binding. Is this a reasonable behavior? And in general, how should let and def interact within the same block?
(Found during the writing of e7dc0d9; opening for public attention)
Currently, a
let
can “scope over” anotherdef
in the same block:This is because the
let
binding has an extra scope (in order to achieve “forward definition”) compared to thedef
binding. Is this a reasonable behavior? And in general, how shouldlet
anddef
interact within the same block?