Closed sorawee closed 5 years ago
Sure. Changed.
Ughh, I just realized the original purpose of the PR. I would like to discourage the use of the old method syntax now, so that Pyret users don't write in the way that the code would break when horizon lands. On the other hand, the new method syntax doesn't exist yet, so I don't want to use it. My original PR is a compromise of these two. It works in all branches.
Anyway, since I changed it to a new method syntax, please don't merge this yet because currently the syntax doesn't exist in the CPO.
The problem with the name: method()...
syntax is it requires introducing the notion of anonymous methods, which is even more subtle than anonymous lambdas. I don't want to introduce that concept here!
Why do it this way? You can keep the other syntax, but prefix it with
method
before the method name.