Related articles |
---|
[6 earlier articles] |
Re: Enumerated data types perelgut@turing.toronto.edu (1990-08-24) |
Re: Enumerated data types dik@cwi.nl (1990-08-27) |
Re: Enumerated data types grover@brahmand.Eng.Sun.COM (1990-08-28) |
Re: Enumerated data types corbett@lupa.Eng.Sun.COM (1990-08-29) |
Re: Enumerated data types pjj@cs.man.ac.uk (Pete Jinks) (1990-08-29) |
Re: Enumerated data types kurt@tc.fluke.COM (1990-08-29) |
Re: Enumerated data types anw@maths.nott.ac.uk (1990-08-29) |
Newsgroups: | comp.compilers |
From: | anw@maths.nott.ac.uk (Dr A. N. Walker) |
Organization: | Maths Dept., Nott'm Univ., UK. |
References: | <1990Aug23.134826.2865@forwiss.uni-passau.de> <3621@goanna.cs.rmit.oz.au> <2019@charon.cwi.nl> |
Date: | Wed, 29 Aug 90 14:26:41 GMT |
In article <2019@charon.cwi.nl> dik@cwi.nl (Dik T. Winter) writes:
[in Algol]
> 'proc'('real','int')'real' + = ('real' r, 'int' i)'real': ....
^^^^^^ 'op'
> [...]. The only kind of coercions allowed for operands
>is 'dereferencing', [...]
Also deproceduring and uniting, but not widening, rowing or voiding.
The reason is, of course, to prevent ambiguity -- you are not allowed to
overload operators with operands varying [eg] only in the reference levels,
but you are with operands varying [eg] only in row levels, so you can
disambiguate operands with the wrong reference levels, but not with the
wrong row levels.
I suspect that at least rowing could have been moved into the other
camp [though there may be some subtleties involving the interaction between
rows and references], but pragmatically one may well want to overload, in
particular, "*" to mean different things for scalars, vectors and matrices.
--
Andy Walker, Maths Dept., Nott'm Univ., UK.
anw@maths.nott.ac.uk
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.