Hacker News new | ask | show | jobs
by mhd 3728 days ago
9term/Unix is still not as lean as something you'd get with a more integrated environment like Oberon or Lisp. Just think of the many ways of parsing arguments and input. Ad-hoc languages wherever you look.
2 comments

Exactly. When you want to exchange data, it's much preferable to have typed/tagged representations. If not that, then one should strive to at least avoid regex "parsing" everything. The exception is that plumbing is okay because it integrates output from all kinds of programs that already exist, but if you have control, it's a lot better to have short prefixes like, say, bug:BUG123, git:COMMITID, pkg:DISTROPACKAGE, etc. But these short prefixes miss namespacing. Anyway, this is only true for acme and friends and in Oberon elements are rich and not plain text.
Yeah, every programmer at one point has to make her own argument parsing library. Nope, there is no one syntax that fits all use cases.

While there are thousands of ways programs can parse arguments (and that's great!) there is only one argument passing mechanism in Unix (plus environment variables for implicit static things and file descriptors for streams).

Unix doesn't care how you parse your arguments, and that's why it is lean, and why it has been successful as a development platform.

Donald Knuth: "I define UNIX as 30 definitions of regular expressions living under one roof."