Files
littlefs/scripts
Christopher Haster a86031de9e scripts: csv.py: Adopted square brackets ([]) for by exprs
By fields are very different from normal fields in exprs (no type
checking, restricted subexprs, etc), so it makes sense to give them
separate syntaxes to clarify this distinction and improve readability.

This commit adopts optional square brackets for by fields, mimicking
generic/template specialization found in other languages:

Before:

  -fx=enumerate()
  -fy=enumerate(a,b)
  -fz=accumulate(z,a,b)

After:

  -fx=enumerate()
  -fy=enumerate[a,b]()
  -fz=accumulate[a,b](z)

Hopefully the readability argument is pretty obvious.

I went with square brackets to avoid parser ambiguities with <>. To be
honest I've never understood why C++ went with <>, array/function
confusion seems easier to resolve than ambiguous binary/index syntaxes,
but what do I know.
2026-03-09 22:55:55 -05:00
..
2025-04-16 15:23:06 -05:00