martinflack
Joined 18 years ago
Joined 18 years ago
The printf zero-padding should be a built-in feature, as dealing with lots of filename structures and date structures needs zero-padding.
I often end up doing things like "for i in $(seq -w 1 100); do.." in bash.
My preference would actually be that -r does automatic zero-padding to fit the widest number that will come out of the range, and another variant like -R would suppress that behavior; but it could also be an optional switch.
It might also be nice to have the code recognize when start is greater than end, like -r 10 1, and support backwards-counting.
A great example is Common Lisp's own LOOP macro - if someone's usage is difficult to understand, you simply ask Lisp to expand it into the more verbose non-LOOP fundamental calls, and you don't need to understand anything about LOOP. In fact you can replace the LOOP form with the expanded code.
That's a key difference from DSL's in most other languages where the DSL code is really data structures that are interpreted.
# it's in my PATH but can't remember where
which myscript
vi `!!`You don't like those? I've always considered them a fairly elegant deconstruction of the problem domain of equality checking. DWIM languages can get very confusing when they DWIM or don't DWIM.
Product Director at Akamai for 3 years, then switched to Engineering for past 14 years. Chief Architect in Architecture & Technology Strategy of Akamai's Cloud Technology Group.