|
On 25/07/2013 14.03, steve donovan wrote:
Even in C++, the standard library makes very sparing use of operator overloading, + for strings, << & >> for stream reading/writing, [] for maps. I agree with Lorenzo that otherwise an impressive string of symbols is an attempt to make 'code' (source) look like 'code' (a secret cipher). Not a good fit for a DSL intended for non-professional programmers!
When I first encountered C++ operator overloading (around 1990), I thought "Wow! Great!" and used them extensively. Then I gradually moved to "Not so great after all" and finally to "Best avoided" (except in cases such as numeric types).
I still get confused by which one of "<<" / ">>" means "in" and which one means "out" (when do data move from right to left?). Fortunately I also learned to stay clear of the stream library altogether :-)
-- Enrico