3 ms·
> transforming a filename into the content of the file" is a really thin justification for a responsibility This is one of those things where I think it is unt
by TOGoS 3y ago
> transforming a filename into the content of the file" is a really thin justification for a responsibility
This is one of those things where I think it is until it isn't.
I sometimes second-guess myself when I think I might be over-single-responsibilifying. "Well in practice these two things are so trivial that this feels a little silly."
It often turns out to have been a good call in hindsight, especially when working with other people who aren't necessarily thinking about these things at all. If the responsibilities have been sufficiently split up, they're more likely to change only the part that needed to be changed, and less likely to complectify the two things together that really shouldn't've been. Or when I go "oh wow that thing that I thought I overly-abstracted sure composes well with this unexpected new thing!"
Hardcore separation of concerns is just another method of defensive programming.
> < access.log head -500 etc etc etc
It's too bad that the syntax is so different. Why does the first stage not end with "|"? There's space for shell syntax improvements, here. Maybe a 'cat'-like builtin that translates `cat foo | bar` into `bar <foo` so you can have the nice syntax but don't needlessly create processes would leave everyone happy.