comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada 2012 Corrigendum
Date: Fri, 12 Sep 2014 14:48:05 +0200
Date: 2014-09-12T14:48:05+02:00	[thread overview]
Message-ID: <1xqds9yahxk70$.9qxbh6rstb21$.dlg@40tude.net> (raw)
In-Reply-To: nRsQv.117415$412.60522@fx30.iad

On Thu, 11 Sep 2014 20:26:35 -0700, Shark8 wrote:

> (2) An aspect indicating a function which is not-only pure, but static 
> -- intended to be computed at compile-time; this could, for example, be 
> used to make the formulae in the endian-independent paper ( 
> http://www.sigada.org/ada_letters/sept2005/Endian-Independent%20Paper.pdf ) 
> directly usable.
> 
> Or should I submit these as AI entries? (In either case, what should I 
> do to get these addressed?)

If you feel ready to formulate a comprehensive proposal, why not.

Handling endianness promoted in the paper is IMO wrong. [*]

Really important cases to consider are:

1. Handling static constraints. E.g. dimensioned arithmetic when the unit
is statically known. All operations must evaluate units statically by
static compile-time functions.

[ The proposal should cover conversion of exceptions in static computations
into compile-time errors. ]

[ The proposal should provide means to declare statically constrained
subtypes and objects with constraints evaluated at compile time from static
constraints of the arguments of a *non-static* operations. ]

Another example of this case is linear algebra package with matrix and
vector types. The static constraint here is the dimension.

2. Initialization of complex structures at compile time. E.g. instantiation
of a generic map with static keys and elements. Initialization of a
constant array of strings etc.

[ The proposal should cover the approach of handling compile-time dynamic
memory allocation and pools. A compile-time pool becomes a constant
initialized object at run-time. ]

[ The proposal should deal with compile-time type declarations, inheritance
and extension, as well as compile-time dynamic dispatch. ]

Good luck.

---------------------------
* For practical use the protocol always defines the exact endianness.
Furthermore, the host types need not to map onto the representations
"on-the-wire", it won't work in most real-life cases anyway.
Serialize/deserialize problem-space type approach is safer and easier to
implement.

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


  parent reply	other threads:[~2014-09-12 12:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12  3:26 Ada 2012 Corrigendum Shark8
2014-09-12 11:45 ` Peter Chapin
2014-09-12 12:48 ` Dmitry A. Kazakov [this message]
2014-09-12 19:09 ` Shark8
2014-09-12 18:51   ` Robert A Duff
2014-09-12 19:08   ` Robert A Duff
2014-10-04  0:32     ` Randy Brukardt
replies disabled

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