brownplt / pyret.org

The site for pyret.org
2 stars 4 forks source link

Preparing to deprecate the old style of method #5

Closed sorawee closed 5 years ago

blerner commented 8 years ago

Why do it this way? You can keep the other syntax, but prefix it with method before the method name.

sorawee commented 8 years ago

Sure. Changed.

sorawee commented 8 years ago

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.

blerner commented 8 years ago

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!

sorawee commented 5 years ago

Fixed already by https://github.com/brownplt/pyret.org/commit/838ce1835733f76d439a81e4ad3637ae345d86ae and https://github.com/brownplt/pyret.org/commit/648e181688d8ce751d564e4087404ddc49afa3f1