4 ms·
I'm curious as to what the author means when discussing whether the extension makes the language "more regular". I thought regularity of languages was a binary
by thinkpad20 10y ago
I'm curious as to what the author means when discussing whether the extension makes the language "more regular". I thought regularity of languages was a binary thing; either a language is or isn't regular. And since all languages with recursive grammars are not regular (if I'm correct in that statement), why does it matter?
Regarding this particular extension it seems more or less fine to me; I'm not sure if it's really worth the effort just to remove a single character (usually) but it doesn't seem like a bad thing overall. I think the resulting syntax would be quite familiar to ruby programmers and could make it easier for newcomers to grok the syntax.
- deleted 10y ago[deleted]
- mathetic 10y agoThey are not referring to regularity in the formal grammar sense, but as constructs being used uniformly under different contexts.
- tikhonj 10y agoRegular as in "uniform", not as in "regular expression". The question is whether this extension conceptually feels like adding an edge case to the syntax or removing one. Does it make the syntax simpler over all?
- wyager 10y agoThat's what I thought too, but if you read the page they're talking about the number of nonterminal symbols in the same sentence...
- tikhonj 10y agoThat's a decent measure of how complex a grammar is. It also highly hints that the language in question is at least context-free: you probably wouldn't use the word "nonterminal" to describe a regular language. (Unless you were specifying a language that happened to be regular as a context-free grammar, I suppose.)