Post Reply 
Idea: new keyword OPERATOR
10-12-2015, 07:03 PM
Post: #2
RE: Idea: new keyword OPERATOR
Having the option to use infix notation when you are used to it can certainly be clearer, but your syntax looks like you would only use the infix notation for the functions you define.

I would suggest instead a syntax more like that used in POP-2:

Definition:

EXPORT matrixmultiply(a,b)
Begin
End -> "***"; //map this procedure to infix symbol ***

Call either as now:
Matrixmuliply(a,b); //useful if you don't know the infix symbol
Or in infix if you like:
A *** b; //more readable

(In fact, in POP-2 you could just use a single "*", and it could work out which multiply you needed based on parameter types:
two reals => internal multiply,
Two matrices => use defined matrix multiply procedure etc.)

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Idea: new keyword OPERATOR - compsystems - 06-11-2015, 12:02 PM
RE: Idea: new keyword OPERATOR - StephenG1CMZ - 10-12-2015 07:03 PM



User(s) browsing this thread: 1 Guest(s)