Open NeilKleistGao opened 2 days ago
There are already some functions using
get
as the name and it seems hard to repick names for them.
Which functions are you talking about? They should all be in this repo and so the migration should be easy.
Perhaps we could just use a naming scheme. Functions called get_XXX
generate a getter for XXX
and similarly for set_XXX
.
fun get_x() = _x
fun set_x(value) = set _x = value
BTW I noticed that in JS get
is not actually a keyword. So yet another alternative approach in a similar spirit as JS:
fun (get) x() = _x
fun (set) x(value) = set _x = value
(it looks a bit weird)
Anyway, this should be done in a separate PR.
What's the rationale for adding a competing Predef for BbML? Can't we use the existing one, and add all functionality needed by BbML in some separate BbPredef module?
What's the rationale for adding a competing Predef for BbML? Can't we use the existing one, and add all functionality needed by BbML in some separate BbPredef module?
So far only checkArgs
in the predef is required. I added a new implementation that can be type checked in Bbml (even though the type-checking for importing is still not done). Or do we plan to use the untyped predef everywhere?
Ah you mean that the current Predef doesn't type check. Then I guess this design is fine for now.
In this PR:
However, I'm not sure if we still need to make
get
a keyword. There are already some functions usingget
as the name and it seems hard to repick names for them.