3 ms·
"Please tack on this random application-specific feature that I like" Can we add supprt for overloading the comma operator? How about the mail function from PH
by wyager 12y ago
"Please tack on this random application-specific feature that I like"
Can we add supprt for overloading the comma operator? How about the mail function from PHP?
- x3ro 12y agoHow are regular expressions "random" and "application-specific"? Admittedly I do not have a source for this, but I'd assume that a large percentage of programs employs Regexes somewhere. Every major language has Regex support, often built-in [1]. Swift, among other things, aims to make things less verbose right? [1]: http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines http://en.wikipedia.org/wiki/Comparison_of_regular_expressio...
- wyager 12y ago> Every major language has Regex support, often built-in That's a very bold statement. My most commonly used languages (Haskell, Rust, Go, C, and C++) do not have regex support built in. I don't think any of them even have regex support in their standard library. >I'd assume that a large percentage of programs employs Regexes somewhere I think that would be incorrect. I've never used a regex in a production program. In fact, the only time I ever use regexes is when I'm scraping data or doing searches, and that certainly doesn't account for "a large percentage of programs". A large percentage of programs also use URL fetching, but that's not a good reason to make URL fetching part of the core language.
- plorkyeran 12y agoRust, Go and C++ all have regex libraries as part of the standard library.
- wyager 12y agoOK, cool. It's still not built in to the language in any meaningful way. There isn't any special syntax or rule-bending done for regexes.
- CUViper 12y agoIt could be less specific as a raw string literal, like python r"".
- DerekL 12y agoYes, and you could also use it for other types of embedded programs, like OpenGL shaders.