comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada generics
Date: Thu, 28 Dec 2006 11:59:16 +0100
Date: 2006-12-28T11:59:09+01:00	[thread overview]
Message-ID: <15jxp8z1iu5fk.1oeihvavjghgg$.dlg@40tude.net> (raw)
In-Reply-To: 1167246396.057028.325080@48g2000cwx.googlegroups.com

On 27 Dec 2006 11:06:36 -0800, Hyman Rosen wrote:

> Dmitry A. Kazakov wrote:
>> The "encoding language" is outside the programming language,
>> so it is not the language problem
> 
> Remember that Ada wishes to be case-insensitive,

That's no problem in a closed alphabet, like English/Latin.

> so it cannot ignore
> Unicode issues if it wishes to allow Unicode characters in identifiers.

Which is a BAD idea, IMO.

We cannot know anything about properties of letters in Klingon. As a
practical example consider Russian where e can be used (and is) in place of
ё see (http://en.wikipedia.org/wiki/%D0%81), but not reverse. Or, maybe we
should make Ada compilers capable to detect program written by Germans to
consider ü and ue same? Should we handle diacritical vowel points of Hebrew
as well? What about parsing the source right to left, or top to bottom?

> Not to mention "normalization form KC".

They reap what they sowed. Should Ada or C++ go into that mess? 

>> No, it would not. Consider 1.0 / 3.0
> 
> I believe an arbitrary-precision rational number package can portably
> represent 1/3! An encoded name for an instantiation involving floating
> point numbers could simply represent the number portably as a rational
> in lowest terms.

Huh, Ada.Numerics has pi and e...

>> But it is not same as having legal finite programs which cannot be compiled
>> no matter how much resources you have.
> 
> So what? Since templates form a compile-time Turing-complete language,
> C++ compilers can be sent into calculations which may or may not
> terminate, just like programs themselves have always been able to do.
> No one has palpitations over the fact that for some programs you can't
> tell whether they're wrong or just haven't finished yet. Why should
> anyone worry that there are some programs which you can't tell whether
> they're wrong or the compiler hasn't finished yet? In order for a
> compilation to not terminate, it must constantly generate new
> instantiations, so anyway real compilers will just notice and give up.

Because when the program does not compile the programmer would not know if
that was his bug or one of the compiler. This is a quite common problem in
C++ (and sadly in GNAT Ada), which wastes enormous human resources. And
this is the case where you actually wished to save them by providing this
"nice" feature. With a sufficient amount of memory, the programmer would
not be able to even decide, empirically, because theoretically it were
impossible anyway, if the compiler hangs or will crash later. I.e. you
might sit 5-10 minutes in hope that it manage to chew over that fancy
templates, before you would kill it in frustration. More memory you'll have
worse it will be.

BTW, it could be a yet another source of earning money. Consider numerous
chains of [expensive] tools for template "optimization." That is source
code conversions which would make compilation crashing faster! (:-))

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



  reply	other threads:[~2006-12-28 10:59 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-21 14:14 Ada generics markww
2006-12-21 15:42 ` Dmitry A. Kazakov
2006-12-22  7:59   ` Martin Krischik
2006-12-22 16:14     ` Hyman Rosen
2006-12-22  7:59   ` Martin Krischik
2006-12-22 16:41   ` Hyman Rosen
2006-12-22 17:33     ` Markus E Leypold
2006-12-22 18:26       ` Hyman Rosen
2006-12-22 20:59         ` Markus E Leypold
2006-12-22 21:01           ` Markus E Leypold
2006-12-23 14:09           ` Marco
2006-12-25 14:23             ` Hyman Rosen
2006-12-29 14:13               ` Marco
2006-12-25 14:20           ` Hyman Rosen
2006-12-23 11:43     ` Dmitry A. Kazakov
2006-12-25 13:49       ` Hyman Rosen
2006-12-25 14:39         ` Dmitry A. Kazakov
2006-12-26  1:34           ` Hyman Rosen
2006-12-26  9:11             ` Dmitry A. Kazakov
2006-12-26 16:23               ` Hyman Rosen
2006-12-26 19:28                 ` Dmitry A. Kazakov
2006-12-27  1:44                   ` Hyman Rosen
2006-12-27  9:21                     ` Dmitry A. Kazakov
2006-12-27 19:06                       ` Hyman Rosen
2006-12-28 10:59                         ` Dmitry A. Kazakov [this message]
2006-12-28 16:29                           ` Hyman Rosen
2006-12-29 11:12                             ` Dmitry A. Kazakov
2006-12-29 14:56                               ` Hyman Rosen
2006-12-28 17:35                           ` Georg Bauhaus
2006-12-29 14:48                             ` Dmitry A. Kazakov
2006-12-29 19:39                               ` Georg Bauhaus
2006-12-30  9:58                                 ` Dmitry A. Kazakov
2006-12-30 14:53                                   ` Georg Bauhaus
2007-01-01 13:00                                     ` Dmitry A. Kazakov
2007-01-02 10:04                                       ` Georg Bauhaus
2007-01-02 11:11                                         ` Dmitry A. Kazakov
2007-01-02 12:33                                           ` Georg Bauhaus
2007-01-02 13:51                                             ` Dmitry A. Kazakov
2007-01-02 14:45                                               ` Georg Bauhaus
2007-01-03 10:10                                                 ` Dmitry A. Kazakov
2007-01-03 14:20                                                   ` Hyman Rosen
2007-01-03 14:55                                                   ` Georg Bauhaus
2007-01-04 10:15                                                     ` Dmitry A. Kazakov
2007-01-03 19:33                                           ` Alexander E. Kopilovich
2007-01-04 10:27                                             ` Dmitry A. Kazakov
2007-01-04 15:00                                               ` Alexander E. Kopilovich
2007-01-05 10:32                                                 ` Dmitry A. Kazakov
2006-12-30  2:25                               ` Randy Brukardt
2006-12-30 10:13                                 ` Dmitry A. Kazakov
2007-01-04  1:09                                   ` Randy Brukardt
2007-01-04 10:07                                     ` Dmitry A. Kazakov
2007-01-05  1:32                                       ` Randy Brukardt
2007-01-05  4:46                                         ` Randy Brukardt
2007-01-05  9:08                                         ` Jean-Pierre Rosen
2007-01-05 20:14                                         ` Georg Bauhaus
2007-01-06  0:14                                           ` Randy Brukardt
2006-12-29  0:09                           ` Randy Brukardt
2006-12-29 11:11                             ` Dmitry A. Kazakov
2006-12-30  2:40                               ` Randy Brukardt
2006-12-21 16:55 ` Hyman Rosen
2006-12-21 18:22   ` markww
2006-12-22  3:01 ` Steve
replies disabled

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