comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: [OT] interesting reason why a language is considered good
Date: Mon, 16 Apr 2012 20:00:43 +0200
Date: 2012-04-16T20:00:43+02:00	[thread overview]
Message-ID: <9s7d2eufbh6f$.1ivcyxfztaq42$.dlg@40tude.net> (raw)
In-Reply-To: 4f8c52b2$0$7627$9b4e6d93@newsspool1.arcor-online.net

On Mon, 16 Apr 2012 19:11:13 +0200, Georg Bauhaus wrote:

> 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?

You asked for examples of programs allegedly suffering from generality of
the word "when", here is one:

   case Alignment is
       when Left => ...;
       when Right => ...;
       when Middle => ...;
   end case;

> 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"?

No, it is you who have to show a great number of reasonable written
programs hugely suffering if "others" were allowed as an identifier. In
order to do this you need to put up examples specific to the word "others."
If the template works for a non-reserved word too, it does not qualify.

>> => 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.

Should not be used /= must be reserved.

Reserved = restricted for special use. I.e. *needed* and *used*, but not
everywhere.

The argument you were trying to make is about illegal words, ones which may
not to used (because they sound bad for you). Example in Ada:
"0_Illegal___identifier"

>> 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.

Counter example:

   procedure Leave (When : Time);

>> 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.

   function "+" (Left, Right : Integer) return Integer;

> 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).

I wonder what Australians would say about that. Anyway X is not reserved.
Why?

>>> "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.

See. In other words, there are other reasons why "when" is reserved.
Exactly my point.

>> 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.

You mean that low budget industry has no access to an editor capable to
colourise Ada source code? Come on, gedit, AdaGide, GPS are free!

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  parent reply	other threads:[~2012-04-16 18:00 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
2012-04-16 17:19             ` Georg Bauhaus
2012-04-16 18:00             ` Dmitry A. Kazakov [this message]
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