4 ms·
I usually don't point this out, but: Come, let us go down and confuse their language so they will not understand each other. Like the issue with RegEx, its pr
by Vektorweg 12y ago
I usually don't point this out, but:
Come, let us go down and confuse their language so they will not understand each other.
Like the issue with RegEx, its probably better to use nice English words in code to describe a problem solution, so that other people can understand it faster (before they get demotivated).
- sp332 12y agoIt's a quote from the story of the Tower of Babel, in the Bible. https://www.biblegateway.com/passage/?search=Genesis%2011&version=NIV https://www.biblegateway.com/passage/?search=Genesis%2011&ve... (Verse 7)
- brudgers 12y agoEnglish words don't solve the real difficulty with Regex's; mathematical regular expressions; or parsers. Describing state machines to do accurately and precisely what we want, though easier than writing an optimizing compiler, is usually non-trivial. The amazing thing about Regex's is that they make describing some state machines easy.
- Vektorweg 12y agoEnglish is a common base. Not everyone understands Regex or enough about math. If you use Regex, some people might not be able to understand and change your Regex if necessary. Well, most of the time, no one else needs to understand it ...
- brudgers 12y agoIs calling '*' "Kleene_Star" a marked improvement? The hard part of regular expressions is envisioning the languages they accept. It's not primarily a difficulty with notation as with the concepts the notation encodes.
- Vektorweg 12y agoThe * or Kleene star describes a sequence of values from a specific set. A nice function name would be "many", like in Haskell's Parsec. In comparison between *, "Kleene_Star" and "many" is the meaning of the function, when named "many", is easy to imply without consulting the docs.