[Jprogramming] Request for comments: multiple assignment
'Mike Day' via Programming
programming at jsoftware.com
Tue Jul 4 17:55:03 UTC 2017
Not multiple assignment, but copula-related.
I've often wondered why J doesn't have the C family feature of assignments
such as
t =: 1 2 3
[t+=: 3
4 5 6
I don't know what it's called, and I realise it's only an arguably
attractive
feature, not an essential one, but would be useful, especially when
translating
(or plagiarising) to J from C-like code.
John Scholes et al managed to include it in Dyalog APL many years ago;
it's
in his "dfns" (dynamic functions, I think) as well as their more
conventional
APL functions and session operations. If I recall correctly, John
spells out rules
for passing values to variables of local scope within dfns using such
operators.
Dyalog doesn't have constructs like t++, though.
Thanks,
Mike
On 04/07/2017 06:40, HenryRich wrote:
> Here is a feature that I have wanted for a long time:
>
> http://code.jsoftware.com/wiki/System/Interpreter/Requests#Expanded_Multiple_Assignment
>
>
> It attempts to solve the problem of moving verb arguments into
> variable-names. Allows defaults and multilevel arguments. I will
> implement this within a month or so, so get your comments in ASAP.
>
> Henry Rich
>
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the Programming
mailing list