1. 12
  1.  

  2. 5

    In the “Parens” section:

    var p = / digit+' ('seconds' | 'minutes' | 'hours' ) /

    There’s an odd number of single-quotes there, so I’m not sure which spans are supposed to be quoted and which aren’t.

    Are the syntaxes labelled “not implemented” not implemented yet, or are they deliberately avoided for some reason?

    Since if word { must treat word as a command for bash-compatibility reasons, and since square-brackets seem to indicate “expression context” in at least a few places, perhaps if [x < 0] { should be the syntax for expression conditionals rather than if (x < 0) {?

    In the “Language Influences” document, the section about Go’s argument parsing says:

    mybuiltin --show=0 # turn a flag that's default true

    Turn it how? Like the Turn Undead spell in D&D?

    1. 3

      Great feedback, thanks!

      I fixed the typos with the first ' and the Go thing. I changed the wording to “not implemented yet”.

      I realized there is really no consistency between parens and parens+sigil, and brackets and brackets+sigil, mostly due to legacy constraints. So I re-organized the doc along those lines.

      It’s technically easier to take over subshell shopt -s parse_paren, for if (x > 0) ..., and I think it just looks more familiar. if [x > 0] would be needlessly different.

      Let me know if you see anything else!

    2. 2

      I made a bunch of changes to the syntax and wrote this doc rationalize it. Feedback is welcome!

      This draft may also be interesting: http://www.oilshell.org/preview/doc/language-influences.html