Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is the code particularly buggy or inefficient? If not, having a feature that you don't use doesn't really affect you. There's an argument that lets you squeeze together multiple blank lines into one. That's arguably superfluous, as you could pipe your text through a sed/awk/ed/perl/snobol script beforehand.

I've never used that argument. But I never had less crash on me because of it, and I don't think it caused a big security impact. If having that command means that every second procedure in the code has to handle special cases because of it, then yes, it's probably not worth it. If it's just a few lines in one place, plus another command line argument parsing section, plus a line in the docs, then why not?

Extraneous features can cause harm, but one shouldn't be too extremist about this and consider each case. When it comes to handling text, there are a lot of special cases that require little code and thus don't really hurt. That's one of the main reasons why GNU utilities might be considered bloated, but most of the time it's no big deal beyond philosophy/aesthetics. (I'm sure my Python/Perl standard lib has a lot of modules I'll never use, too)

On the other hand, I'm not quite sure whether I'll ever need the Tektronix emulation of xterm...



This is going against exactly what Doug is arguing, though: Unix taste includes having many small, perfectly-designed programs to achieve great power. Adding more and more features to something simple adds complexity, and therefore, in Doug's opinion, makes it less elegant.

Obviously `less` is a pretty bad example for this, because it's so simple. But that's his point-- it should just be a pager, that's it. But it doesn't just do that-- it does a great many other things, has all sorts of arguments that you can pass to it unnecessarily.

Regarding your xterm comment, you might want to consider the `st` terminal emulator, a suckless tool. It's really great, consists of one C file, and is extremely minimal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: