3 ms·
Dylan had kebab-case idents and infix operators. It worked okay because you have to separate infix operators with a space anyway; omitting it is a syntax error
by nostrademons 5y ago
Dylan had kebab-case idents and infix operators. It worked okay because you have to separate infix operators with a space anyway; omitting it is a syntax error.
In practice I doubt this would trip me up because every coding standard I've worked with has mandated spaces around infix operators. I suppose it might be a lot more confusing if you're used to coding standards that allow you to omit them, but my understanding is that's a minority.
- cormacrelf 5y agoMaybe it would be okay with syntax highlighting and a careerful of code formatting muscle memory, but how would that fare in an educational context? > "Pyret is a programming language designed to serve as an outstanding choice for programming education"
- chowells 5y agoOnly having one correct way to do something with very simple rules (always put whitespace around operators) is easy for students. It's when the rules are complicated with exceptions and multiple correct ways that things get hard to learn.
- skrishnamurthi 5y agoIt's been working great, actually. https://news.ycombinator.com/item?id=28265117 https://news.ycombinator.com/item?id=28265117
- justinpombrio 5y agoSame thing in Pyret, it's a syntax error to not put a space around infix operators.