I mean it’s JS. I’m not touching that if I can help it. But what you describe is less of a problem with the concept and more one with an immature technology.
I mean it’s JS. I’m not touching that if I can help it. But what you describe is less of a problem with the concept and more one with an immature technology.
but it’s less portable and more verbose
you misspelled “less obtuse and more expressive”
Also it doesn’t compete with regex. It’s an abstraction layer. You know, the thing programmers have been building since the dawn of programming to make everyone’s lives easier. There’s a reason why everyone who has the option to has stopped working directly with assembly and C.
I disagree. Anyone familiar with regex can debug these statements post conversion. Anyone not familiar with regex is going to have to learn something in order to debug the statement. I’d rather learn something that’s expressive and easy to visually parse.
regex syntax is a vestige of the old “as few bytes as possible” era where every character of code had to be written personally. It’s an obsolete way of thinking for the vast majority of programming.
hey hey! Regex are awesome! Fuck regex syntax!
When you want to get better using a hammer, just treat everything as a nail.
Sure. I just very rarely need just basic regexes.
And once you go beyond these the syntax gets very obtuse. Which means I’m spending an hour+ googling something close to what I need and then using a sandbox to try and tweak it until it does what I need. Then I paste something into my code that I won’t understand anymore 5 minutes into the future - which isn’t exactly great for maintainability.
me for example. I don’t write regex often enough to be really familar with the cryptic syntax. But I do use them every once in a while and dread the occasion every time. Having a more expressive way to write pattern matching instructions would be really useful to me.
I am very much in the market for a way to do regex without resorting to incantations that look like someone spilled a bag of special characters. Just not on JS…
You seem to be the author. A suggestion to you. You should really rethink your playground. All it currently does is turning melody into regex, which is important to have for comparison. But you’re specifically courting people who DON’T want to deal with regex syntax. What you desperately need is a way to run melody expressions. And - if possible - a way to translate regex into melody wouldn’t hurt as well.
Many (most?) of us tend to google regex on the web and pasting them in our code. Having them converted into a syntax that we can better understand would be hugely helpful.
Basically if you need the same logic in two places instead of copying it to the second place you make it into a function and use that function in both places.
That way if you need that logic to change you only need to make that edit once regardless of whether you use it one time or one thousand times.