3 ms·
> There are also some issues such as closures having a different syntax than top-level functions: he wants to be able to move functions easily between scopes.
by bjz_ 12y ago
> There are also some issues such as closures having a different syntax than top-level functions: he wants to be able to move functions easily between scopes.
But closures have different semantics to functions, both in representation and in execution. The semantics of his language becomes even more confusing when he says that items at the top level are position independent, where as it seems that those in a function scope are, and yet they share the same syntax. There is a simple fix though. Just keep a uniform syntax for position independent items, but allow them to be declared at any scope. That is exactly what Rust does.
- gnuvince 12y agoYeah, I don't disagree, I'm just relating what he said in videos 1 and/or 2 about Rust. Personally, I'm all for having different syntax for different semantics.