I would like to point out that I am actually the creator of this idea, and not the author. The author has created a variation in C#, that has some differences.
I came up with this idea 2 years ago. Some differences I see between my idea and this c# implementation are:
Or() is confusing by itself. In mine, you pass in objects or strings, such as:
var regex = new RegExpBuilder()
.either(pattern1)
.or(pattern2);
var regex = new RegExpBuilder()
.either("sometime")
.or("soon")
.or("never");
Also, all the special characters are escaped properly (\ is not escaped).
There are shortcuts - you don't have to do
.exactly(1).of("hackernews")
you can just do:
.then("hackernews");
In terms of differences between this and VerbalExpressions, verbal expressions is very limited. It cannot represent many quantifiers (eg, at least 3 of something), does not have decent ways to group subexpressions, and so on. It can only represent (in a practical way), about 0.000001 % of regular expressions, as opposed to RegExpBuilder.
Yes if you write it like that, it removes one of my complaints, but it leaves the other. You now have inconsistency in the language because LINQ is basically being used as a new type of language added to an existing language. You are working with two languages at once. Why stop there? Why not add python to c#? And every other language. The super language that has everything from everywhere. It is a total mess.
Yes, it requires a wide-screen monitor. I don't think I can answer the other question as I don't see any value in it. Turning loops and so on into a giant, inflexible (unless you want two wide-screen monitors) daisy-chain of methods does not improve the readability or maintainability of code. It also encourages programmers to perform actions that should otherwise be in "repository" classes, in inappropriate places.
The from item in blah syntax is just SQL rearranged, and SQL isn't as expressive as programming language constructs, so why try to emulate it?
It encourages you to write the grain of salt statement I mentioned earlier, which requires programmers to read through and understand the implementation of what you are doing, instead of it being embodied in a meaningful method and called. Of course you could just wrap that in a method, and slowly grow the line to 2-3 wide-screen monitors as you add more conditions.
The more tools you add to the core of a language, the more of a monstrosity of a kitchen sink it becomes (c#/.NET). Now you can loop over a list in 6 different ways! Hooray! That is why Dart looks good - a few basic concepts that can be used to build things suited to a particular problem.
I have little knowledge of the latest trends in programming languages, but if your example of a good PL theorist is someone who designed LINQ, then I am going to have to take your opinion with a grain.OfType(Salt).Where(m => m.Value.Contains(nothing)).ToList<Salt>().OrderBy(m => m.irrelevance).FirstOrDefault<Salt>();
The devices are fast enough, but with that speed came massive battery life problems. Therefore, the same problem exists, its effects have just moved somewhere else. It is therefore not comparable with the desktop.
The original repository is at:
https://github.com/thebinarysearchtree/RegExpBuilder
I came up with this idea 2 years ago. Some differences I see between my idea and this c# implementation are:
Or() is confusing by itself. In mine, you pass in objects or strings, such as:
Also, all the special characters are escaped properly (\ is not escaped).
There are shortcuts - you don't have to do
you can just do:
In terms of differences between this and VerbalExpressions, verbal expressions is very limited. It cannot represent many quantifiers (eg, at least 3 of something), does not have decent ways to group subexpressions, and so on. It can only represent (in a practical way), about 0.000001 % of regular expressions, as opposed to RegExpBuilder.