3 ms·
To me, the lead example on the homepage ("Basic") is a major red flag. This is not clearer than a traditional regular expression: 'Hello' ' ' Did you count th
by turnsout 4y ago
To me, the lead example on the homepage ("Basic") is a major red flag. This is not clearer than a traditional regular expression:
'Hello' ' '
Did you count the single quotes correctly? Even with syntax highlighting, people WILL mess this up.
- kstenerud 4y agoThe fundamental problem comes from assigning meaning to whitespace (in this case, concatenation). I had the same issues when developing KBNF ( https://github.com/kstenerud/kbnf/blob/master/kbnf.md https://github.com/kstenerud/kbnf/blob/master/kbnf.md ) which operates in a closely related space (grammars). In early development, I took a number of cues from existing work that turned out to be bad ideas, in particular using whitespace for concatenation (which all BNF dialects seem to do). Switching to '&' for concatenation (reading it as "x and then y") made things a lot clearer, as it would also do for Pomsky: 'Hello' & ' '+ & ('world' | 'pomsky')
- turnsout 4y agoYes, the ampersands are far, far more comprehensible. Also, as a binary format enthusiast (I built a binary "Codable" implementation for Swift), KBNF looks great! I'll be following your progress.