So far, 0.11 is shaping up to be a release without significant syntax changes. However, there are some things that I’d really like to change. This includes reverting some previous changes. That’s why I’d like to gauge what people think, so we don’t create unnecessary churn for unpopular changes. I’d also like to talk a bit about the considerations here.
The Changes
Comments with //
I keep mistyping comments myself because curly-braced languages usually have comments with //. So I’d like to revert back to using that. I know I changed this just a few releases ago, but # just doesn’t feel right in the end.
In the future, we can expand this more easily to doc-comments (///) and block comments (/* … */).
From variant to enum
The first reaction of everybody I have talked to about variant types was “why did you call it that?” And you know what, that’s fair. The enum is fairly standardized across languages and is immediately recognizable for Rustaceans.
Negation with !
This is a similar change to the comment change: curly-braced C-style languages usually have ! for negation instead of not. This also makes it more consistent because we have symbols for other boolean operations as well, such as && (instead of and) and || (instead of or).
Match with =>
Rust’s match syntax uses =>, which I found a bit weird, so when I implemented match in Roto, I changed it to ->, but that seems to diverge unnecessarily from Rust.
The Bigger Picture
All of these changes bring Roto closer to Rust. That’s both good and bad. Let’s start with the good: Roto will be easier to pick up for Rustaceans.
However, Roto should also have its own identity. The more Roto looks like Rust, the more people expect Roto to work like Rust and that might lead to issues where they diverge. A second problem is that Rust is not necessarily a language that Roto users might be familiar with.
I find it tricky to find a balance here. The current syntax was an attempt at merging the syntax of several languages into something that I thought fit Roto, but small divergences from Rust only seem to confuse.
Feel free to chime in with any opinions! Do you agree with the changes? How do you want to see Roto evolve? Are there other syntax changes that you’d really like to see?