comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: C++0x : no 'concepts'
Date: Wed, 9 Sep 2009 14:39:44 +0200
Date: 2009-09-09T14:39:44+02:00	[thread overview]
Message-ID: <1myjt3v3dwqj3.1t8nncvu2ty3l$.dlg@40tude.net> (raw)
In-Reply-To: 4aa79ba6$0$32663$9b4e6d93@newsspool2.arcor-online.net

On Wed, 09 Sep 2009 14:12:21 +0200, Georg Bauhaus wrote:

> Martin schrieb:
>> Crickey! How glad am Ada has strong typing and a generic contract
>> model!!
>> 
>> http://www.ddj.com/cpp/218600111
>> 
>> And that was going to make life 'simpler'!?!?!?
> 
> Just saw this, addressing the question:
> 
> "The current definition of concepts and requirements for use drowns the
> programmer in complexities of a magnitude not warranted by the need to
> express type-checked 9constrained) generic programming."
> 
> From: Simplifying the use of concepts, linked in the article.
> 
> -
> 
> Fantasizing, could we have, in Ada,
> 
> - recursive instantiations of pure generics?

Huh, the second edition of interfaces, now for the "Ada preprocessor"? I
read you that all instances of the same body when instantiated
automatically will be considered "same". Right?

> - an optional Compiler package?

The idea of Ada generics is that types aren't checked beyond a handful of
built-in classes like "<>", "private", "limited private" etc and operations
specified explicitly as formal parameters. This is not a contract of a type
or a set of types, that can be dealt with, e.g. constrained, extended, at
least named.

If you had truly "type-checked  & constrained" formal generic parameter,
you would not need to handle it as a subject of wild substitutions in the
generic unit. You would probably be able to use it as-is, without
instantiation...

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



  parent reply	other threads:[~2009-09-09 12:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09 11:44 C++0x : no 'concepts' Martin
2009-09-09 12:12 ` Georg Bauhaus
2009-09-09 12:15   ` Martin
2009-09-09 12:39   ` Dmitry A. Kazakov [this message]
2009-09-09 14:47     ` Georg Bauhaus
2009-09-09 15:42       ` Dmitry A. Kazakov
2009-09-09 14:49 ` Adam Beneschan
2009-09-09 19:26   ` sjw
2009-09-10  0:16 ` wwilson
2009-09-10  0:45   ` Keith Thompson
2009-09-10 23:36     ` Stephen Leake
2009-09-11  4:36       ` wwilson
2009-09-11 10:10 ` John McCabe
replies disabled

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