The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Compounding the Error

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Compounding the Error Posted: May 24, 2006 11:34 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Compounding the Error
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

As if "final" isn't bad enough, some people would like to make it the default:

I’ll say it one more time: final should be the default. Java’s mistake was not that it allowed classes to be final. It was making final a keyword you had to explicitly request rather than making finality the default and adding a subclassable keyword to change the default for those few classes that genuinely need to be nonfinal. The lack of finality has created a huge, brittle, dangerously breakable infrastructure in the world of Java class libraries.

Umm, sure. Because every library I've ever used was designed specifically with my needs in mind, and I've never, ever had to extend anything.

*Cough*

That must have been something coming up there. I guess the BS meter just went to infinity, and I couldn't take it anymore. He goes on:

One final point: final is the safe, conservative choice. Should you mark a class or method final, and later discover a need to subclass/override it, you can remove the finality without breaking anyone’s code. You cannot go the other way. Once you’ve published a class that’s non-final you have to consider the possibility that someone, somewhere is subclassing it. Marking it final now risks breaking people’s running code and working systems.

It's safe, just like a straitjacket. With all possible movement impossible, how much can you do? It's not about breaking someone else's code anyway. When I get a library from a vendor, I don't expect perfection - I expect a best effort, given the knowledge the engineers had at the time. I fully expect to have to subclass in some places, to delegate in others, and to override methods in subclasses in some cases. Heck, I'm using smalltalk, so my amp goes to 11 over here - I may even change code in existing classes in the library. I'm sure that concept will make his head explode, but my goal is to empower the developer - not to break his wrists because he folded the napkins wrong.

Read: Compounding the Error

Topic: New Articles Previous Topic   Next Topic Topic: Agility through discipline

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use