4 ms·
Change takes time! This is a great example, as he has specific instances of evolving syntax to describe the same thing, semantically. The big problem, of cours
by AceJohnny2 10y ago
Change takes time! This is a great example, as he has specific instances of evolving syntax to describe the same thing, semantically.
The big problem, of course, is that code hangs around. Can you evolve your syntax as people get used to it? Not only are you adding work to your parser, but people who use your language also have to deal with the multiple iterations of the syntax that linger in various codebases. This is one reason I detest dealing with Perl codebases.
Anyhow, as an exercise of evolving syntax while keeping the underlying semantics, I find Reason [1], a new syntactic layer over OCaml, particularly interesting.
[1] https://facebook.github.io/reason/ https://facebook.github.io/reason/
- sriram_sun 10y agoTrue. However, it would also be nice if there is an automated upgrade path for syntactic changes like python 2to3.
- nickm12 10y agoPython 2 to Python 3 is a semantic change, which is why it has been so slow going for some codebases.
- dherman 10y agoThe reason for layering is that the lower layer code remains compatible and even, let's say, idiomatically acceptable if excessively verbose.
- stymaar 10y ago> Can you evolve your syntax as people get used to it? Not only are you adding work to your parser, but people who use your language also have to deal with the multiple iterations of the syntax that linger in various codebases. Clippy[1] helps a lot in this case, it helps people writting idiomatic Rust and it's updated when new syntaxes introduces new ways to do stuff, so the old one is deprecated _de facto_. [1] https://github.com/Manishearth/rust-clippy https://github.com/Manishearth/rust-clippy
- Manishearth 10y agoThere's actually some interesting discussion about making Clippy suggest ? instead of try: https://github.com/Manishearth/rust-clippy/issues/1361 https://github.com/Manishearth/rust-clippy/issues/1361
- kazagistar 10y agoIt would make sense to leave some time for the documentation to stabilize and usage to spread a little before pushing hard in that direction I think.
- rtpg 10y agoSyntax is one of the easiest things to migrate, because it can be statically detected. Though it could be a bit trickier with optional types and pattern matching If your company decides to not use try!, then you can set that up (and have an opt-out for when you "really" know what you're doing)