Call by parameter name is emulated with strings in graphic procedures in
Icon, with some price in the speed and complexity of the implementation.
However, call by parameter name (CBPN) seems too similar to old BASIC
subroutines not to provoke some suspects in its substantiality. For
example, BASIC code
x:=a; z:=b; GoSub p
provides some (not all) of the functionality of p(x:=a, z:=b) with nearly
equally elegant syntax, at least in Chaitin's meaning (see for example
http://www.flownet.com/gat/chaitin.html .) In Unicon, if procedure is
declared with
procedure p(l,m,n,x,y,z)
equivalent of the p(x:=a; z:=b) seems to be expression
(every (l|m|n|x|y|z):=&null) & x:=a & z:=b & p(l,m,n,x,y,z).
The first and the last of the conjuncts are fixed, used always in the same
form, so even limited Unicon macros allow further simplification. One of
the possibilities is
P(x:=a & z:=b)Pend .
Hence, those who like (or tolerate) macros can manage CBPN for themselves,
perhaps not in the prettiest possible form, however, it is possible.
----
Kazimir Majorinc, Zagreb, Croatia
- [Unicon-group] Proposal for changing the parameter type ... Wade Bowmer
- Re: [Unicon-group] Proposal for changing the parame... Clint Jeffery
- Re: [Unicon-group] Proposal for changing the pa... Majorinc, Kazimir
- Re: [Unicon-group] Proposal for changing th... Nevin :-] Liber
- Re: [Unicon-group] Proposal for changin... Majorinc, Kazimir
