comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Programmer defined arrays
Date: Mon, 06 Aug 2012 21:05:39 +0200
Date: 2012-08-06T21:05:38+02:00	[thread overview]
Message-ID: <50201582$0$9505$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <87mx289bjy.fsf@adaheads.sparre-andersen.dk>

On 06.08.12 19:26, Jacob Sparre Andersen wrote:
> Georg Bauhaus wrote:
>
>> 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
>
> In practice functions of _discrete_ arguments may be seen as _constant_
> arrays.  You can not assign a value to a function, and arrays can only
> be declared with discrete indexes.
>
>> In this light, why should we be given means to express how arrays
>> should be translated into instructions?
>
> What means do we have to express how arrays should be translated into
> instructions?

We cannot do much more then suggesting layout, alignment and such.
But some have said they want more control over the translation of "array".
Apparently, though, a similar wish is not expressed for "function",
or callable. Why is that? A function also is an abstraction, just like
an array is.

I thought that these two concepts, "array" and "function", might or might
not be fundamental. If "function" is so fundamental that no one asks for
more programmer control over the translation process of a function, why
do some ask for more programmer control over the translation process
for arrays, via array becoming a type suitable for O-O, but function
not becoming an O-O type?




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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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