``` (\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]){3}| ```
with the Beads notation:
``` pattern octet group or digit // matches 0..9 set:'1-9' digit // matches 10 .. 99 '1' digit digit // matches 100 .. 199 '2' set:'0-4' digit // matches 200 .. 249 '25' set:'0-5' // matches 250 ..255
pattern IPv4 octet '.' octet '.' octet '.' octet ```
The Javascript version is extremely hard to read. I can't change the underlying engine that supports regular expressions as that is built in to the Browser runtime, but i can at least make notation friendlier.
Unified languages in the past like VB6 and Borland Delphi were beloved, and many people were productive in those environments, and clinged to them long after MS for example wanted to migrate people into .NET, because they were so much simpler.
The current complexity level that people have to endure is unnecessarily high. Never before in history did people write in 3 different languages in the same source code file (as they routinely do in JS + CSS + HTML), where they don't even agree on how comments are notated.
The current situation benefits the large incumbents like Google, Facebook and Amazon.
People dont usually put them all in the same file. Html and css are mostly not even programming languages. And shell scripts commonly have sed or awk embedded in them.
I'm not saying that a more unified approach is bad, on the contrary there's pros and cons, but you're being a bit hyperbolic about it. Nothing about the current situation is that new or unique. Nor is proposing a more consistent environment new either. Computer world has been going back and forwards on this since forever.
"Group or digit" matches 0-9?
I dont think it helps that you're missing newlines. Try putting four spaces at the start of every line.
JS style: (\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]){3}
Beads style:
pattern octet
group or
digit // matches 0..9
set:'1-9' digit // matches 10 .. 99
'1' digit digit // matches 100 .. 199
'2' set:'0-4' digit // matches 200 .. 249
'25' set:'0-5' // matches 250 ..255
pattern IPv4
octet '.' octet '.' octet '.' octet
As you can see the Beads pattern notation allow subroutines, uses keywords like 'digit' instead of \d, and is far more readable. There are plenty of examples, and the more complex the expression the more favorable the comparison.Haxe already exists [1] to unify everything, similar to beads' claims. It doesn't.
Unifying has been done better before with it, C (it does run almost everywhere!), Java, Flash/Flex, and JS+HTML. Many have entered. Few win for a little while, and eventually everything loses.
My measurement of complexity includes both the syntax of the language, and also how many library API's you have to learn.
Haxe, which has roots in an open source version of Adobe's ActionScript is an excellent product. I often consider switching to Haxe for the implementation of the transpiler as it would yield Linux support. I currently emit AS3 or JS code, but Haxe is a very strong possible direction in the future as Haxe has a lot of portability.
I don't consider C a unified language. It had no database, no drawing model, no event model, and Berkeley Sockets was a library added in to support the internet, that unfortunately did not achieve complete standardization. C is the most portable language, but it just a step above Assembler, and full of pitfalls.
Tools do wax and wane in popularity; they are all useful in certain circumstances, and the more generally useful the tool, the more it gets used. VB6 was abandoned by its owner MS, when Gates retired (Basic was his pet project, as it was the original foundation product of MS' fortune). People used it as long as they could (and some still do). VB6 didn't make the jump to the Internet, but it could have if MS hadn't tried to force everyone into .NET (which was very complex).