Re: Is Smart Eiffel ready for large-scale application ? (Modula 3 and Eiffel verbosity and libraries)
Joseph Kiniry <[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.smalleiffel |
|---|---|
| Message-ID | <[email protected]> |
Hi Wolfgang, Dominique, et al, --On 12 April, 2005 12:32:14 +0200 Wolfgang Jansen <[email protected]> wrote: > Dominique Colnet wrote: > >> Wolfgang Jansen wrote: >> >>> >>> I think because fewer character make texts more intelligible! >>> You may this observe in natural languages as well as in artificial >>> languages >>> as mathematical and chemical formulas. When some new thing (or >>> process, situation ...) >>> has to be expressed in a language it will be expressed rather wordy. >>> When it is no longer new and has often to be expressed then the >>> expression >>> will be soon reduced to a bar minimum. So, an Eiffel feature name like >>> `get_new_iterator_on_keys' is very nice when it is newly introduced >>> in a library, >>> or used for the first time by a newcomer. After some time one would be >>> satisfied with `key_iterator' or even `keys'. Most characters of the >>> original >>> long name are redundant for no gain, instead they are disturbing because >>> they prevent seeing more contents at once. In other words: less is more! >> >> But, just forget your code for about 6 months (i.e. take some very long >> vacations ;-)... and the long name `get_new_iterator_on_keys' will be >> better than the short hand I think. >> I am using emacs and I am a fan of the completion (Alt / is just >> wonderful). >> Best regards, > > 6 months vacation, that's what I have ever dreamed of. > > More seriously, my point was that writing compact program > texts is not only for the writer's convenience (and if > the writer can use means to write long words easily the > compactness looses bit of its appeal) but for also for > the reader's convenience. A program text inflated by > redundancy makes it much harder to fetch the central point, > in particular, if the text is unnecessarily spread over > several pages. > > Back to the 6 months vacation. For testing your hypothesis > I had a look into some classes I have edited last 17 months ago. > I had no problem to understand short identifiers again. > For example, there is a `obj' and I immediately knew that > this does not mean `object' but `objective_functional'. All of these discussions are simply about programming conventions. Thus, you do it your way, I'll do it my way, we both document our coding standards, and let the market decide. If you are the only consumer of your code, then you can do as you will, but if you have clients, I am afraid their perspectives outweigh your own. I, for one, have noticed a dramatic increase in legibility of FLOSS code over the past 15 years, and most of that change is due to better choice of identifiers (IMO, slightly longer than you want, more semantically meaningful, even at the cost of a few characters), improved syntactic layout choices (closer to what you want, so as to fit more code on a single "page", but not at the expense of legibility), etc. Joe -- Joseph R. Kiniry Dept. of Computer Science, University College Dublin http://secure.ucd.ie/