5 ms·
> If you know RegExp's, the syntax will immediately make sense If I know RegEx, why would I use pomsky?
by AkshatJ27 4y ago
> If you know RegExp's, the syntax will immediately make sense
If I know RegEx, why would I use pomsky?
- DemocracyFTW2 4y agoIf you know RegEx, you have two problems.
- BtM909 4y agoIf you solve a problem with RegEx, you now have two problems!
- echelon 4y agoVariables and comments seem nice. Insignificant whitespace is needed to support it, and as an added bonus it would make it easier to break up patterns across multiple lines. The syntax changes and added verbosity do not seem great, though. They'd trip me up for sure. In general, I think I'd like to see a language more like "Regex 2.0", ie. an extension that doesn't depart too far from what we're used to.
- joshka 4y ago(?x) mode in regexes does comments / whitespace / multiple lines. +1 to the syntax
- mhitza 4y agoWhile a language like Raku (formerly known as Perl 6) is unlikely to catch up in the current landscape, it did bring a lot of improvements to regular expressions (link to section that starts to use interesting examples [1]). Way back somewhere in the 2010s when I was still keeping an eye on Perl 6, I was kind of hoping that all these improvements would make their way into some kind of PCRE v3 that all other tools that already use PCRE would switch to. Would have been nice. [1] https://docs.raku.org/language/regexes#Alternation:_|| https://docs.raku.org/language/regexes#Alternation:_||
- skrebbel 4y agoBecause if you know regexp, you know how terrible it is.
- junon 4y agoDisagree, honestly. I really don't like this True Scotsman absolutist statement either. If pomsky was able to guard against ReDos then maybe I'd consider switching. Otherwise, I have no problems reading and understanding regular expressions.
- lucideer 4y agoI've yet to meet anyone who thinks this. The greatest problem with regexp is not its complexity nor learning curve: it's its apparent complexity & learning curve. That tends to put learners off, but anyone I know who's persisted has found the journey faster than expected. After they're over it, everyone I've talked to thinks pretty highly of the syntax: it's simple (small set of compostable components) & expressive, especially if using labelled groups. The second greatest problem with Regexp is learning query optimisation: that's definitively complex but this new syntax doesn't even attempt solving that.
- vanderZwan 4y agoEh, I can manage to write a regexp with a little effort, but reading them has never stopped being painful. So in my anecdotal, sample-size one experience it leans heavily towards write-only language. This might do better there.
- rjh29 4y agoDo you use the /x modifier?
- Garlef 4y ago> I've yet to meet anyone who thinks this. Hello *waves* The only thing regexp has on the plus side is that it's compact. I'd prefer something that's more readable without knowledge. I know how to use it but I always have to google it. I only use it once per year and so there's no big win in mesmerizing it.
- YesThatTom2 4y agoCode readability isn’t for you. It is for the next person that maintains the code.
- leeoniya 4y ago...which is often "future you" :)
- deleted 4y ago[deleted]
- kyriakos 4y agoI wrote a lot of regex but I find reading regex extremely hard. Even expressions I wrote myself become unreadable after a few months.