comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Programmer defined arrays
Date: Mon, 06 Aug 2012 16:28:59 +0200
Date: 2012-08-06T16:28:55+02:00	[thread overview]
Message-ID: <501fd4a7$0$9524$9b4e6d93@newsspool1.arcor-online.net> (raw)

IIUC, an array can be seen as a mapping

  (Index_Type[1], ..., Index_Type[n]) -> Component_Type

where n is finite.
Similarly, a function can be seen as a mapping (*)

  (Param_Type[1], ..., Param_Type[m]) -> Return_Type

We can write a function's body (or its expression in Ada 2012).
We cannot, however, express how the function's mapping is to be
translated into instructions to be executed by some processor.
That's the job of the compiler.

Suppose translating a function into its instructions is to
remain the job of the compiler. (Therefore, recursively, that of
the persons writing the compiler.)

In this light, why should we be given means to express how arrays
should be translated into instructions?

__
(*) Both mappings are variable, since array components can be
assigned and since Ada functions are not pure, but that's an aside.



             reply	other threads:[~2012-08-13  9:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-06 14:28 Georg Bauhaus [this message]
2012-08-06 14:55 ` Programmer defined arrays Dmitry A. Kazakov
2012-08-06 17:26 ` Jacob Sparre Andersen
2012-08-06 19:05   ` Georg Bauhaus
2012-08-06 19:54     ` Dmitry A. Kazakov
2012-08-06 21:03       ` Georg Bauhaus
2012-08-06 21:52         ` Dmitry A. Kazakov
replies disabled

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