views:

29

answers:

1

Are the implicit type coercions the absoulte evil? Or the history does know a decent implementation of what I've never heard..

Is `weak' typing doomed to be implemented in a way it is done in PHP, Javascript etc.?

+1  A: 

This is not an all-or-nothing issue.

Nearly all languages have some sort of implicit type conversion (most commonly between numerical types), and it can always lead to unexpected behviour in some situations, but at the same time, people complain when they have to manually do conversions that they consider obvious.

Just as with many other things, language designers have to balance the advantages of having only explicit (and thus easy to understand) behaviour with the disadvantages of forcing unnecessary verbosity.

Michael Borgwardt
Sounds very much like true :) I just thought that there could be a way to make a really weakly-typed system so that it will by no means intervene the main aspects of program consistency. Maybe these are just vain hopes.
Bubba88