A quite memorable article [1] described a “backwards” message-passing technique in C++ using operator overloading so you could do stuff like: obj [1] https://jacobfilipp.com/DrDobbs/articles/DDJ/1996/9608/9608e...
I skimmed the article and haven't gotten out the compiler or source files, but does anyone understand how arg1 and arg2 with space and no operator in between are syntactically valid C++, and what do they do?
Dr. Dobb's Developer Library DVD 6 (2010)
51–54 of 54 posts
Re: Dr. Dobb's Developer Library DVD 6 (2010)
#52Some interesting stuff you will get out of Dr. Dobbs articles, as someone that was an avid reader. - The Small C compiler set of articles, where you will get the sense not even K&R C was used outside UNIX for quite some time, only a common subset. - The toolbox articles creating a Turbo Vision like framework in Object Pascal - The evolution of Python and related adoption - Strange programing languages like Actor, C@+…
I think it was C+@ (pronounced CAT, as I recall). Edit: pasting a comment of mine from here in 2019 [1]: The language is C+@ [2]. I dug up an article about it in Dr. Dobbs Journal, the October 1993 issue. This does not seem to be the article I am remembering, since it does not go into the instruction interleaving technique anywhere near as much as I remember, but they do mention it and say it was called "beading": Th…
Folks can get a sense of C+@ from https://jacobfilipp.com/DrDobbs/articles/DDJ/1993/9310/9310b....
The links to the figures still work, as of today.
Re: Dr. Dobb's Developer Library DVD 6 (2010)
#53Earlier quoted context omitted.
I skimmed the article and haven't gotten out the compiler or source files, but does anyone understand how arg1 and arg2 with space and no operator in between are syntactically valid C++, and what do they do?
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.
obj
which requires overloading the less-than, unary negation, and the double-less-than operators.