Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Yes! 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: