comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Making sense of predicates
Date: Wed, 23 Oct 2013 11:25:23 +0200
Date: 2013-10-23T11:25:23+02:00	[thread overview]
Message-ID: <34g5l1787w2f$.1fnf8eraqqbpy.dlg@40tude.net> (raw)
In-Reply-To: 1fc36959-9863-4720-b772-6b4f064d4b6b@googlegroups.com

On Tue, 22 Oct 2013 14:30:15 -0700 (PDT), Dan'l Miller wrote:

> On Tuesday, October 22, 2013 2:26:28 PM UTC-5, Dmitry A. Kazakov wrote:
>> On Tue, 22 Oct 2013 10:15:13 -0700 (PDT), Dan'l Miller wrote:
>>> Ahhhh, you seek effectively the C++ vision,
>>
>> No idea what makes you think so.
> 
> And that is unfortunate, because I told you above.  I reiterate:  The A#1
> mantra of major sectors of the C++ community (e.g., Boost) is to perform
> functionality in libraries whenever possible instead of in the core C++
> language. 

But this is not specific to C++, it is just a good language design
principle, which C++ does not follow anyway.

I merely responded to Randy's moan about the ARM's section about the
accessibility rules. To handle complexity you have to say good-bye to
monolithic design. Specifically regarding the accessibility rules, there is
no chance one could make them sensible. Pointers cannot be made safe.
Period. Investing into safe pointers is wasting time. One should rather do
into means helping the programmer to avoid pointers. Instead of that Ada
introduced access to subprogram, access discriminants, anonymous access
etc. What did you guys expect doing so?

>>>  What you seek is a better way of layering the compiler and extending the compiler,
>>
>> I seek a better types system because of problems the current one causes,
>> like overuse of generics and run-time checks. I, as a programmer, need more
>> static checks, more reuse, far less debugging.
> 
> Dmitry, please take a hint:  your type goals would be satisfied as a mere
> library by-product of accomplishing a much much MUCH more difficult goal
> of taming the beast of layered compilers that accomplish multistage
> programming,

So the point is that the type system is all OK? Or maybe you are with Randy
and others who believe that though it is not OK, but nothing substantial
could be accomplished and it is better to start a new language from
scratch, but we rather won't?

[...]

The reason to have it in a library is backward compatibility.

Now about fragility et al. Consider the subtype Positive. It is a library
thing defined in the standard library:

   subtype Positive is Integer range 1..Integer'Last;

Note that the language does not need Positive because it already has a more
generic mechanism of constrained subtypes which library uses.

Now, try to apply your points about fragility to Positive. Carefully
observe that while applications using Positive are indeed fragile. The
reason for that lies in the Positive itself. It is a target-dependent
[sub]type and thus ill-defined in a wider context of multiple targets. This
fragility is not because there is something wrong with Ada's subtypes!

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


      reply	other threads:[~2013-10-23  9:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21 19:51 Making sense of predicates Dmitry A. Kazakov
2013-10-22  4:35 ` Randy Brukardt
2013-10-22  8:19   ` Dmitry A. Kazakov
2013-10-22 12:53     ` Georg Bauhaus
2013-10-22 13:38       ` Dmitry A. Kazakov
2013-10-22 20:38         ` Georg Bauhaus
2013-10-24  4:03     ` Randy Brukardt
2013-10-24  7:26       ` Dmitry A. Kazakov
2013-10-22  7:14 ` Shark8
2013-10-22  7:35   ` Jacob Sparre Andersen
2013-10-22 17:26     ` Shark8
2013-10-23  7:56       ` Jacob Sparre Andersen
2013-10-24  3:58       ` Randy Brukardt
2013-10-22  8:11   ` Dmitry A. Kazakov
2013-10-22  7:20 ` Jacob Sparre Andersen
2013-10-22  7:57   ` Dmitry A. Kazakov
2013-10-22 14:52     ` Dan'l Miller
2013-10-22 16:30       ` Dmitry A. Kazakov
2013-10-22 17:15         ` Dan'l Miller
2013-10-22 19:26           ` Dmitry A. Kazakov
2013-10-22 19:49             ` J-P. Rosen
2013-10-22 21:30             ` Dan'l Miller
2013-10-23  9:25               ` Dmitry A. Kazakov [this message]
replies disabled

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