3 ms·
I was afraid someone might come in and declare this a non-problem, or school me on the example I chose in an effort to invalidate my overall argument. For every
by Udo 10y ago
I was afraid someone might come in and declare this a non-problem, or school me on the example I chose in an effort to invalidate my overall argument. For every example I could conceivably come up with, there is a locally optimal arcane way of achieving a good result. That's not what this is about. Functional (im)possibility was not the message of my argument, ease of use and structural cleanliness was.
The issue here is not really finding a "better" way to implement this exact example, it's finding a better mechanism for what the example represents.
Can you make everything work with today's tools? Absolutely. Can you do it without arcane switches and weird corner cases? Mostly not. The question I'm raising is more whether this pain is inevitable or not.
- Symbiote 10y agoA shell for loop is not arcane — that's one of the shell's most basic control structures. It uses one fewer external command (no "find"), which is a great way to avoid the weird (and common) corner cases. But anyway, I think you missed where I wrote, "treating the output as objects would be an improvement", and presented a better example in support of your suggestion.
- Udo 10y ago> But anyway, I think you missed where I wrote, "treating the output as objects would be an improvement" We already agree about that part (at least sort of). Instead I wanted to address the part where you declared my example invalid and where we're talking about nothing else but the details of this one example. Did I choose it poorly? Was it too simplistic? Maybe, it really depends on your tastes. I content that arguing about whether or not the find command is usefully implemented is besides the point. The problem lies deeper and is more systemic than that. I'm not arguing that a loop construct is arcane, I'm arguing that in practice such scripts turn arcane really quickly, and that there is something substantial to be gained from having tools exchange information in a structured, machine-centric format - and also from switching to a human-centric control format.