Programmer Defined Overloading : Syntatic Heroin ?
An ACM Queue article : http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=315
Author's Arguments :
Things with different meanings are made to look the same, hampers readability, complicates compiler writing ( resolution of the function call to the right function definition), any inadvertant mistakes by the programmer in making a function call coupled with conversion rules lands us in soup.
Note that all these arguments are being made for programmer defined overloading and the author sees no problems with built-overloading ( for eg, of operators )
Can the same arguments be made for generics/templates ? Tradeoffs between developer( code writer) friendliness, maintainer ( debugger ) friendliness and compiler writer friendliness ? Are the lack of proper typing rules really to blame rather than overloading ?
Interestingly this article has a reference to the JLS :-) . Overloading & Java ?
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home