Re: SPAM: Writing Comprehensible Code
Nic Ferrier <[email protected]> 15 Oct 2004 00:51:00 +0100
| Newsgroups | gmane.comp.java.advanced-servlets |
|---|---|
| Message-ID | <[email protected]> |
[email protected] writes: > One of the things I would have loved is a limited version of operator > overload. I can understand why the original Java inventors added "+" for > Strings (who wants to write concat() all the time) but allowing it for any > class would lead to the abuses frequently seen in C++. However extending > the Number class or more flexibly, implementing a Numeric interface, to > allow operator overload would be nice. While the interface version could > be abused fairly easily, extending Number should be fairly controllable. > Autoboxing should reduce my desire for operator overload but I strongly > suspect I will continue to miss it. I hate overloading generally. In thinking about my perfect world (so I can implement it in Thin) I came to appreciate Perl's answer to this more and more. Perl's answer is the idea of tieing a variable to some implementation class. You can therefore make something look like a more natural part of the language... but the fact that you're doing it is really obvious to readers of the code. The most obvious example of this is the way Perl hashes are often tied to DBM or GDBM databases instead of in-memory objects. I like it so much I might just implement it in Thin. > BTW even though I am not an Xtreme programmer I too believe that the code > is the ultimate documentation. The number of times I've seen the doco > missing, out of date or just plain wrong (and that includes inline > comments and javadoc) is incredible. Maintenance programmers will > generally find more often than not that the doco is useless. Documentation is really hard to write. I have been complemented on my documentation but the programmers I teach seem unable to grasp whatI'm saying about it so I suspect that I don't really know if, why or when I write good doc. Nic ------------------------ Yahoo! Groups Sponsor --------------------~--> $9.95 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> Before posting a question, try to find your answer here: <http://www.egroups.com/links/advanced-servlets> Announcements should go to: [email protected] To Post a message, send it to: [email protected] To Unsubscribe, send a blank message to: [email protected] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/advanced-servlets/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/