Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Scrap Your Boilerplate

Name: Anonymous 2015-05-01 16:43

12 lines of Agda code is verified red-black tree insertion.
12 lines of Java code would be a class declaration with some getters/setters

Name: Anonymous 2015-05-01 19:30

>>10
No, it's not pointless, because when the client used .getField() in his code, he didn't want just a number, he wanted a particular piece of functionality. .getField() is a signal sent to your object, and if your object responds in the way expected of it, everything's fine. As for the underlying representation, it doesn't matter. You can change it over time, add functionality, make your class more flexible and adapt it to changing user requirements - the code will still work. You just have to change your coding style from numbers and bits to black boxes that exchange messages. It doesn't matter what's in the box if it can respond to messages and send messages with the functionality that you or your client code wants.

Thanks for taking Object Orientation 101.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List