in reply to All in one
Is this an instance of premature optimization? Do they believe in the false economy that "less text" equates to "more efficient code"? Or perhaps as delirium's meditation seems to imply, they think that "less text" equates to "more elegant code"? Granted, there are some instances where it would make the code read better if there were a way to get some complex functionality into one expression, but you know what? We already have a way to do that; they're called subroutines. I think people need to realize that clarity trumps cleverness always (okay, except when your goal is cleverness like with golf or obfuscations)
Part of writing good programs involves making trade-offs, and to balance resources. There are many resources to deal with, and "screen estate" is one of them. A window can only display a limited amount of lines at a time - and a persons view usually even less. Tersity means a person going through the code needs to scroll less/move less with their eyes. (This is also one of the reasons I don't like to mix code with POD, and that I am not liberal with comments). Subroutines don't always make it easier to grok code. A program that can be read top to bottom is sometimes easier to figure out than a program where you have to jump all over the file to follow a programs logic (OO makes it even worse).
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: All in one
by duff (Parson) on Jan 14, 2004 at 20:17 UTC |