comp.lang.ada
 help / color / mirror / Atom feed
* Q: null records and box
@ 2006-06-17 15:50 Georg Bauhaus
  2006-06-19 23:44 ` Randy Brukardt
  0 siblings, 1 reply; 5+ messages in thread
From: Georg Bauhaus @ 2006-06-17 15:50 UTC (permalink / raw)


John Barnes writes about a null record type, "The aggregate
for the (null) value ... can be written as (null record)
or even as (others => <>)." (Barnes 2006, p.146)

Is the latter part is now rubbed out by LRM 4.3.1(15),
so that (null record) is the one way to express a null
record aggregate?

(GNAT would be right, then.)


Georg 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: null records and box
  2006-06-17 15:50 Q: null records and box Georg Bauhaus
@ 2006-06-19 23:44 ` Randy Brukardt
  2006-06-20 14:44   ` Georg Bauhaus
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Brukardt @ 2006-06-19 23:44 UTC (permalink / raw)


"Georg Bauhaus" <bauhaus@futureapps.de> wrote in message
news:44942492$0$11080$9b4e6d93@newsread4.arcor-online.net...
> John Barnes writes about a null record type, "The aggregate
> for the (null) value ... can be written as (null record)
> or even as (others => <>)." (Barnes 2006, p.146)
>
> Is the latter part is now rubbed out by LRM 4.3.1(15),
> so that (null record) is the one way to express a null
> record aggregate?
>
> (GNAT would be right, then.)

That looks like a bug in Ada 2005. It certainly was my intent that you could
write "(others => <>)" for a null record (I rewrote this text for a number
of reasons in the later stages of the Amendment work; I don't ever recall
thinking that 4.3.1(15) prevented that). I think the "null record" syntax is
a mistake, in that it doesn't look like the syntax you would expect for an
aggregate.

Anyway, I'll check with the ARG (just because it was *my* intent -- and one
tht John also expected -- doesn't mean that it was really intended).

                                 Randy.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: null records and box
  2006-06-19 23:44 ` Randy Brukardt
@ 2006-06-20 14:44   ` Georg Bauhaus
  2006-06-20 20:32     ` Jeffrey R. Carter
  0 siblings, 1 reply; 5+ messages in thread
From: Georg Bauhaus @ 2006-06-20 14:44 UTC (permalink / raw)


On Mon, 2006-06-19 at 18:44 -0500, Randy Brukardt wrote:

>  It certainly was my intent that you could
> write "(others => <>)" for a null record ...

> Anyway, I'll check with the ARG (just because it was *my* intent -- and one
> tht John also expected -- doesn't mean that it was really intended).

Thanks, also for the nice new language you have made.
As far as I've got so far, it feels much more permissive
and to have fewer edges. And some things are frighteningly
quicker to write. Now if that isn't a major improvement ... ;-)


-- Georg 






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: null records and box
  2006-06-20 14:44   ` Georg Bauhaus
@ 2006-06-20 20:32     ` Jeffrey R. Carter
  2006-06-20 21:54       ` Georg Bauhaus
  0 siblings, 1 reply; 5+ messages in thread
From: Jeffrey R. Carter @ 2006-06-20 20:32 UTC (permalink / raw)


Georg Bauhaus wrote:
> 
> Thanks, also for the nice new language you have made.
> As far as I've got so far, it feels much more permissive
> and to have fewer edges. And some things are frighteningly
> quicker to write. Now if that isn't a major improvement ... ;-)

 From the ARM-0X Introduction: "emphasis was placed on program 
readability over ease of writing". Quicker to write is not necessarily a 
good thing, or we'd all be using APL.

-- 
Jeff Carter
"I was hobbling along, minding my own business, all of a
sudden, up he comes, cures me! One minute I'm a leper with
a trade, next minute my livelihood's gone! Not so much as a
'by your leave!' You're cured, mate. Bloody do-gooder!"
Monty Python's Life of Brian
76



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: null records and box
  2006-06-20 20:32     ` Jeffrey R. Carter
@ 2006-06-20 21:54       ` Georg Bauhaus
  0 siblings, 0 replies; 5+ messages in thread
From: Georg Bauhaus @ 2006-06-20 21:54 UTC (permalink / raw)


Jeffrey R. Carter wrote:
> Georg Bauhaus wrote:
>>
>>  And some things are frighteningly
>> quicker to write. Now if that isn't a major improvement ... ;-)
> 
>  From the ARM-0X Introduction: "emphasis was placed on program 
> readability over ease of writing". Quicker to write is not necessarily a 
> good thing, or we'd all be using APL.

Right, that's what the smiley was trying to say. But OTOH,
if you follow Barnes' integration example, some things _are_
easier to write now, and no less safe, or less readable.
This example, explained by its author, as well your remark
about readability, as mentioned by Robert Dewar, can be seen
on video, offered on the GNAT site.

BTW, J, a successor to APL, is totally unreadable 2-character
ASCII ideography, but the ideographs can be named, leading to
somewhat improved applicative expressions IMHO.


-- Georg



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-06-20 21:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-17 15:50 Q: null records and box Georg Bauhaus
2006-06-19 23:44 ` Randy Brukardt
2006-06-20 14:44   ` Georg Bauhaus
2006-06-20 20:32     ` Jeffrey R. Carter
2006-06-20 21:54       ` Georg Bauhaus

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