Re:Why do long options start with two dashes? (2019)
by ben0x539 on Friday April 09, 2021 @12:31AM
(#26746742)
I feel like `jq` does the "more like a language" thing better than `find`, but possibly its just a product of its time.
[ Parent
| on HN ]
Re:Why do long options start with two dashes? (2019)
by chubot on Friday April 09, 2021 @02:10AM
(#26747208)
Well the thing find and test have in common is that they lack a lexer! They abuse the argv array for tokens instead. I might call it the "I'm too lazy to write a lexer" pattern :)
jq has a lexer and hence a "real" syntax, but so does awk, which is maybe 30 years older. But yes jq is a surprisingly big and rich language, maybe bigger than awk: