comp.lang.ada
 help / color / mirror / Atom feed
From: Lionel Draghi <lionel.draghi@gmail.com>
Subject: Re: Iterable container as generic parameter
Date: Sat, 27 Jan 2018 03:38:41 -0800 (PST)
Date: 2018-01-27T03:38:41-08:00	[thread overview]
Message-ID: <8a75d56c-29d0-464a-9f2a-9126d8f17ba1@googlegroups.com> (raw)
In-Reply-To: <p4h88j$crv$1@franka.jacob-sparre.dk>

Le samedi 27 janvier 2018 08:03:49 UTC+1, Randy Brukardt a écrit :
> ...
> >By the way, I have another question. There is no way to provide a default
> > instantiation to a formal package parameter?
> 
> Not in Ada 2012 or before. There is an open issue (it is one of those that 
> Emmanuel referenced in his message) to allow that. It hasn't progressed any 
> significant amount at this time.

Very interesting indeed, to have lawyers and implementers view on a language change proposal.

From my user point of view, the "or use" proposal looks very good.
It's simple (to write!), easy to read (much more in my opinion than "with Default_Type => ..." syntax).

I would just add that, when reading the comment on the ":=" proposal, that ":=" may seems to imply copying a type, I realized that I was already reading :
> procedure New_Line (Spacing : Positive_Count := 1);
as "give your own spacing, _or use_ 1 if none given", and not as 
"_copy_ 1 in Spacing if none given". 

So, IMHO, I wouldn't give a high weight to this argument.
 
And, actually, 
> procedure New_Line (Spacing : Positive_Count or use 1);
looks good too :-)
 

 

> (Aside: There are a LOT of ideas submitted for Ada 2020. Many good ideas are 
> likely to be left out simply because of lack of time and/or too much 
> change.)


  reply	other threads:[~2018-01-27 11:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25  0:22 Iterable container as generic parameter Lionel Draghi
2018-01-25  3:36 ` Randy Brukardt
2018-01-25 14:58   ` Lionel Draghi
2018-01-25 18:26     ` briot.emmanuel
2018-01-26  4:50     ` Randy Brukardt
2018-01-26  9:09       ` briot.emmanuel
2018-01-26 22:32         ` Lionel Draghi
2018-01-27  7:03           ` Randy Brukardt
2018-01-27 11:38             ` Lionel Draghi [this message]
2018-01-27 14:31               ` Jere
2018-01-28 18:08         ` Lionel Draghi
2018-01-29 13:34           ` briot.emmanuel
2018-01-29 22:26             ` Lionel Draghi
2018-01-29 23:00               ` Randy Brukardt
2018-01-30 22:35                 ` Lionel Draghi
2018-01-30 23:32                   ` Lionel Draghi
2018-01-31  0:15                   ` Lionel Draghi
2018-01-30 15:13               ` Shark8
2018-01-26 23:07 ` Lionel Draghi
replies disabled

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