comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: [OT] interesting reason why a language is considered good
Date: Mon, 16 Apr 2012 19:11:13 +0200
Date: 2012-04-16T19:11:14+02:00	[thread overview]
Message-ID: <4f8c52b2$0$7627$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <szik5e8e6n4m$.dgyqh41b6k6b$.dlg@40tude.net>

On 16.04.12 17:31, Dmitry A. Kazakov wrote:
> On Mon, 16 Apr 2012 17:01:05 +0200, Georg Bauhaus wrote:
> 
>> On 16.04.12 15:06, Dmitry A. Kazakov wrote:
>>> On Mon, 16 Apr 2012 13:48:04 +0200, Georg Bauhaus wrote:
>>>
>>>> On 16.04.12 12:43, Marius Amado-Alves wrote:
>>>>> Love OT threads in this clever forum:-)
>>>>>
>>>>> Actually there is a bit of thruth in the absurd no keyword thing:
>>>>> *many* keywords can get in the way of naming identifiers. Ada, for one,
>>>>> has a bit too many keywords, with some good identifier candidates (when,
>>>>> others...)
>>>>
>>>> "when" and "others" are general abstractions. What kind
>>>> of programs will in effect be about general abstractions?
>>>
>>> The kind of programs in Ada language, which uses exactly these words.
>>
>> And these are? (If you could avoid the tautological void.
>> Be constructive! ;-)
> 
> All Ada programs that use the case-statement.


How now? First, you distinguish syntax from some "rest" of
the program, and then, when I do the same, the distinction is gone?

My question is: If "others" were moved from syntax to identifiers,
then what fraction, and what kind of programs will hugely profit
because they can now name things "others"? (In place of "foreigners",
or "remaining_parts", or "tail", or "<the-opposite>", or  ...)


>>> Your 
>>> argument is bogus. If a reserved word is good for the language then it is 
>>> good for a program in that language.
>>
>> If a reserved word is good for the language, then it is a general
>> abstraction, such as "when", or "others", because is it applicable to
>> all kinds of programs regardless of concrete notions.

Rephrased:

(reserved(word) = good-for(C(identifiers))
 => general-abstraction(word)

No further conclusions other than a wish for a list of words
not recommended for use as identifiers either, such as "what".

> => it is bad to use in all programs => it is bad for the language in which
> all these programs are written. q.e.d.

IIUC, this is close to what I have said about the word "what" as
an identifier. "What" is bad in programs except maybe in programs
whose problem domain is the singleton word "what". It should not be
used as an identifier, IMHO.


> Surely "when" and "at" are prefect names for a formal parameter of the type
> Time.

I disagree. In my initial response, I made them "Leaving_When" and
so on, as these names are more meaningful. "at" is worthless without
context (at a place? at a time?). You could require context with
dot notation. Pkg.T? Pkg.Obj?  Really?  I cannot at the moment
think of a really good way to use "at" as an identifier in the body
of a function.

    when := offset (when => at);

Seen from another angle, refactoring becomes a nightmare if
you have wish to reuse an Ada function in a PascAlgol-17 program,
by rewriting, say, if its profile uses names that are ubiquitously
reserved :

   Index (From => ..., To => ..., );

And vice versa for the reverse.

I'd rather not have Ada fans tell me that they couldn't care
less, why don't I use Ada etc., when at the same time they are
witness to programs breaking because Ada didn't at least warn
against using the fairly general word "interface" when it was
around already. Clear an plain.

Java did better, insofar as "goto" is reserved even though it
is not part of the language's syntax.


> Also your argument to universality would also apply to the parameters named
> "X", "Y", "Left", "Right" all over the LRM. It did not work there, but
> suddenly does for "when"?

A word may work in an LRM. However, a program's problem domain is
not the LRM, in general.
Simon Wright has recently shown a nice way how to mend the situation
with X and Y for surface orientation, using Ada 2012 (substituting
Northings and Eastings in the profile, IIRC).

>> "What" as an identifier shouldn't be, IMHO,
>> reserved or not, so words like "what" not being reserved does
>> not count as counter-argument in my book. I'd rather have a
>> list of words not recommended to augment reserved words.
> 
> So either they must be reserved or your argument is wrong. The choice is
> yours.

There is no MUST here. Programming is a human activity, not to
be HALTed: What counts is understandability of a program, which I think
is not to be had from some reduction to an ad-hoc rules base on
a formalism made for a different purpose (C(identifier)).


> Statistically irrelevant.

I know I am not statistically relevant. Yet, for actual statistics,
if you see how programs are written in the low budget industry
that might change your mind.  The industry includes Google.



  reply	other threads:[~2012-04-16 17:11 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-15 10:27 [OT] interesting reason why a language is considered good Nasser M. Abbasi
2012-04-15 11:57 ` J-P. Rosen
2012-04-16 10:37   ` Peter C. Chapin
2012-04-15 12:27 ` Dmitry A. Kazakov
2012-04-17  6:59   ` tonyg
2012-04-17  7:43     ` Dmitry A. Kazakov
2012-04-15 14:05 ` Bill Findlay
2012-04-15 14:21 ` Pascal Obry
2012-04-15 14:54   ` Simon Wright
2012-04-15 15:34     ` Pascal Obry
2012-04-17  5:42       ` Brad Moore
2012-04-17 16:11         ` Simon Wright
2012-04-17 16:33           ` Robert A Duff
2012-04-17 19:34             ` Simon Wright
2012-04-17 21:42               ` Robert A Duff
2012-04-17 22:24                 ` Randy Brukardt
2012-04-18  7:00                   ` stefan-lucks
2012-04-17 21:17             ` Jeffrey Carter
2012-04-15 23:53     ` Brian Drummond
2012-04-16 10:43 ` Marius Amado-Alves
2012-04-16 11:48   ` Georg Bauhaus
2012-04-16 13:06     ` Dmitry A. Kazakov
2012-04-16 15:01       ` Georg Bauhaus
2012-04-16 15:31         ` Dmitry A. Kazakov
2012-04-16 17:11           ` Georg Bauhaus [this message]
2012-04-16 17:19             ` Georg Bauhaus
2012-04-16 18:00             ` Dmitry A. Kazakov
2012-04-16 21:48               ` Georg Bauhaus
2012-04-17  3:43                 ` Randy Brukardt
2012-04-17  4:43                   ` Bill Findlay
2012-04-17  7:46                   ` Georg Bauhaus
2012-04-17 22:32                     ` Randy Brukardt
2012-04-18  7:10                       ` stefan-lucks
2012-04-18 23:48                         ` Randy Brukardt
2012-04-19 14:22                           ` Shark8
2012-04-17 15:48                   ` Simon Wright
2012-04-17 16:15                     ` Dmitry A. Kazakov
2012-04-17 19:33                       ` Simon Wright
2012-04-17  7:34                 ` Dmitry A. Kazakov
2012-04-17 16:01                   ` Simon Wright
2012-04-17 17:42                   ` Georg Bauhaus
2012-04-17 19:17                     ` Dmitry A. Kazakov
2012-04-17  3:24           ` Randy Brukardt
2012-04-17  3:33           ` Randy Brukardt
2012-04-16 19:55   ` sbelmont700
2012-04-17  0:48   ` Peter C. Chapin
2012-04-17 21:59 ` anon
2012-05-13  4:14   ` David Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox