I think it's time for bind to go. My reasons:
- The language will have that many fewer keywords and syntactic constructs.
- The semantics are incompatible with closures. Right now, if I write
foo(_, f()) this evaluates f() right away and binds the result into the closure. This is quite different from {|x| foo(x, f())} which is surprising. This has led to bugs.
- The type system is complex enough. Bind is a weird corner case we tend to forget about. We already found one such problem (move mode arguments) and I am confident there are more lurking. Let's simplify our lives and only think about closures, which are hard enough.
As a side effect of this change, naming a method like a.b without calling it will presumably become an error.
I think it's time for bind to go. My reasons:
foo(_, f())this evaluatesf()right away and binds the result into the closure. This is quite different from{|x| foo(x, f())}which is surprising. This has led to bugs.As a side effect of this change, naming a method like
a.bwithout calling it will presumably become an error.