2 ms·
Aha, the syntax is actually `button <- setSize << 10 << 20;` according to DEMO.CPP in /1996/9608/dynacpp.zip of the ISO. So operator-() initializes the Message
by zzrrt 6mo ago
Aha, the syntax is actually `button <- setSize << 10 << 20;` according to DEMO.CPP in /1996/9608/dynacpp.zip of the ISO. So operator-() initializes the Message object, operator<<() stores the parameters into it, which is then passed to operator<() to invoke the function. I guess the HTML page was badly transcribed or failed to escape the characters.
- cobbzilla 6mo agoYes! The linked article didn’t capture all the symbols in the original DDJ article. There were in fact `<<` preceding each arg. The actual line was: obj<-method << arg1 << arg2 which requires overloading the less-than, unary negation, and the double-less-than operators.