Re: Verbose functional languages?
- From: Rainer Joswig <joswig@xxxxxxx>
- Date: Thu, 06 Dec 2007 18:33:26 +0100
In article
<0815fbde-f4b1-443f-8377-b47ddce7de6b@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Ingo Menger <quetzalcotl@xxxxxxxxxxxxxx> wrote:
When you read text, it is not much of a difference if
you have small words or long words.
Disagree.
Remember,
everyone trained to read does not look much
at individual words or characters - that's much too
slow. Most trained people look at chucks of
words and shape. So for them it would not make
much difference if the text contains has the error
in small, medium sized or long words. 'more' vs.
'mere' vs. 'moer' does not make much a difference
if you look at some piece of code.
Thats exactly my point.
For example, when reading a novel translated from a foreign language
(i.e. russian) it happened to me, that I confused the characters (i.e.
named persons in the novel), since I take "Nikolajewitsch" on first
reading as "that long name starting with N" and "Nikoforowitsch" also
as "that long name starting with N".
Therefore, I suggest to avoid variable names longer than 1 character,
whenever possible.
You are kidding, right?
Well, there is light ;-) , source coloring, interactive help on symbols,
code browsers, and so on. When I have a symbol I don't know, I usually
place a cursor on it and press a show documentation command.
If that does not help, I inspect it with another key.
A key? Really? Why not type: please-inspect-that-word-that-I-am-not-
understanding? I wonder how a naive beginner will master those tools
with their cryptic, one-letter abbrevations!
I prefer writing and reading "bvve" without pressing completion.
Really? I would make it 'verboten' by a coding style guideline. ;-)
And I would cite Götz von Berlichingen to you, or better yet, increase
my hourly rate. :)
I guess you would not make it into the team. :)
Do you talk with abbreviated words to other people?
You could say BVVE instead of the word above.
This happens all the time.
Do you ever ride the S-Bahn? Or the Stadtbahn? Same holds for U-Bahn
and Untergrundbahn. The workers of the GDL strike, so no ICEs are
running. And so forth.
I live in Hamburg and there is a Containerschiff still a Containerschiff
and not a C-Ship. A Hafenfähre is not a F-Bahn and the Elbtunnel
is not 'et'.
How is BVVE not easily to misunderstand?
A single word is not to misunderstand at all. A variable name is only
menaingful in a context, ie.e
bvve *= 1.05; // raise by 5%
And before, I read the comment saying that bvve was the compensation
of the president of the alpine emrgency troop, in euros per week.
Oh, you need added comments. That's even worse. A recipe for disaster.
It has no correspondence
to natural language.
Not true. Abbrevations are daily bread and butter. See above.
-. Abr r d br + bu. s ^.
I see that you write full words here.
If you read it in code, there is no
way to say if it is right or wrong by staring at it.
For the long word, you could at least recover
some meaning.
But you couldn't be sure, since you know, that the only real meaning
of a variable name is to uniqely identify some language defined item.
No more, no less.
The real meaning of a variable is to name something:
SICP:
Programs must be written for people to read, and only incidentally
for machines to execute.
For me a well written program reads like a good novel.
--
http://lispm.dyndns.org/
.
- References:
- Verbose functional languages?
- From: Rüdiger Klaehn
- Re: Verbose functional languages?
- From: Rüdiger Klaehn
- Re: Verbose functional languages?
- From: Jon Harrop
- Re: Verbose functional languages?
- From: klohmuschel
- Re: Verbose functional languages?
- From: Jon Harrop
- Re: Verbose functional languages?
- From: klohmuschel
- Re: Verbose functional languages?
- From: Jon Harrop
- Re: Verbose functional languages?
- From: klohmuschel
- Re: Verbose functional languages?
- From: Chris F Clark
- Re: Verbose functional languages?
- From: Ingo Menger
- Re: Verbose functional languages?
- From: Chris F Clark
- Re: Verbose functional languages?
- From: Ingo Menger
- Re: Verbose functional languages?
- From: Ingo Menger
- Re: Verbose functional languages?
- From: Rainer Joswig
- Re: Verbose functional languages?
- From: Ingo Menger
- Verbose functional languages?
- Prev by Date: Re: Verbose functional languages?
- Next by Date: Re: function overloading in SML
- Previous by thread: Re: Verbose functional languages?
- Next by thread: Re: Verbose functional languages?
- Index(es):