comp.lang.ada
 help / color / mirror / Atom feed
* Programmer defined arrays
@ 2012-08-06 14:28 Georg Bauhaus
  2012-08-06 14:55 ` Dmitry A. Kazakov
  2012-08-06 17:26 ` Jacob Sparre Andersen
  0 siblings, 2 replies; 7+ messages in thread
From: Georg Bauhaus @ 2012-08-06 14:28 UTC (permalink / 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.



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

end of thread, other threads:[~2012-08-13  9:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-06 14:28 Programmer defined arrays Georg Bauhaus
2012-08-06 14:55 ` 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

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