Why not? Because named verbs are on an equal footing with primitives, so the sentence:

a plus =: 5

would be interpreted as an assignment to plus, not to a.

Henry Rich

On 7/4/2017 1:55 PM, 'Mike Day' via Programming wrote:
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

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to