On 12/09/2006, at 11:56 AM, Malcolm V wrote:

  The true evil is overloading. Dynamic typing allows operator
overloading which makes things really hard for anyone to parse correctly.

Things like the simple plus symbol (+) no longer means add two numbers together, but "munge two things together". With the poor programmer left
to remember what happens when various types are munged together.

Not necessarily...

Like all powerful programming language features, operator overloading can be used for good or for evil. People who work on and use maths libraries greatly appreciate C++'s operator overloading's capabilities. Haskell, in particular, has great support for operator overloading, and the language will ensure that you cannot abuse it for things that aren't numeric. (In Haskell, you cannot actually overload the + operator to concatenate two strings, for example -- a common (ab)use of + that's present in a lot of dynamically typed languages.)

(And, as Erik said, operator overloading has nothing to do with dynamic typing.)


--
% Andre Pang : trust.in.love.to.save  <http://www.algorithm.com.au/>



_______________________________________________
coders mailing list
[email protected]
http://lists.slug.org.au/listinfo/coders

Reply via email to