Scalar extension: Difference between revisions

Jump to navigation Jump to search
m
→‎Singleton extension: HOPL 4 paper has a nice table of conformability support
m (References section)
m (→‎Singleton extension: HOPL 4 paper has a nice table of conformability support)
 
Line 29: Line 29:
In this case addition accepts a singleton, and discards its shape. If two singletons are used as arguments, they are still considered to [[Conformability|conform]]; the shape of the result is taken from the argument with higher rank.
In this case addition accepts a singleton, and discards its shape. If two singletons are used as arguments, they are still considered to [[Conformability|conform]]; the shape of the result is taken from the argument with higher rank.


Singleton extension was supported in [[APL\360]] by 1970<ref>S. Charmonman. [https://dl.acm.org/doi/10.1145/987461.987468 A generalization of APL array-oriented concept]. [[APL Quote Quad]] Volume 2, Number 3. 1970-09.</ref> and is generally present in later APLs. However, [[ISO/IEC_13751:2001]] only specifies extension of a one-element vector and not of any singleton, and some newer dialects such as [[dzaima/APL]] and [[Kap]] don't implement singleton extension.
Singleton extension was supported in [[APL\360]] by 1970<ref>S. Charmonman. [https://dl.acm.org/doi/10.1145/987461.987468 A generalization of APL array-oriented concept]. [[APL Quote Quad]] Volume 2, Number 3. 1970-09.</ref> and is generally present in later APLs. However, [[APL2]] and specification [[ISO/IEC_13751:2001]] only extend a one-element vector and not any singleton,<ref>[[Roger Hui]] and [[Morten Kromberg]]. [https://dl.acm.org/doi/abs/10.1145/3386319 ''APL since 1978'']. ACM HOPL IV. 2020-06. §2.1 Tally.</ref> and some newer dialects such as [[dzaima/APL]] and [[Kap]] don't implement singleton extension.


Singleton extension can sometimes conflict with other extensions, an issue which does not occur with scalar extension. If a function is extended to allow a shorter vector argument to be extended (perhaps by padding with 0), but it also supports singleton extension, then there is a conflict with length-1 vectors.
Singleton extension can sometimes conflict with other extensions, an issue which does not occur with scalar extension. If a function is extended to allow a shorter vector argument to be extended (perhaps by padding with 0), but it also supports singleton extension, then there is a conflict with length-1 vectors.

Navigation menu