3 ms·
One thing I always appreciated about CoffeeScript was its [heregex syntax](https://coffeescript-cookbook.github.io/chapters/regular_expressions/heregexes https:
by loginx 2y ago
One thing I always appreciated about CoffeeScript was its [heregex syntax](https://coffeescript-cookbook.github.io/chapters/regular_expressions/heregexes https://coffeescript-cookbook.github.io/chapters/regular_exp...), which made regexes clear and easy to document.
Many CoffeeScript constructs were adopted into JavaScript and TypeScript, but unfortunately, heregexes weren't among them.
- yesbabyyes 2y agoI agree. I'm pretty sure jashkenas got it from Ruby, which got it from Perl, with the `/x` flag (for extended regular expressions). Later languages have added support for the `x` flag, including C# and Rust. There is also a stage 1 proposal for JavaScript: https://github.com/tc39/proposal-regexp-x-mode https://github.com/tc39/proposal-regexp-x-mode