Transcript and Dot Notation
alex at tweedly.net
Mon Feb 27 09:16:13 EST 2006
John Vokey wrote:
> I'd rather stick pins in my eyes. Seriously: what is gained here
> that can't be accomplished with either a) copy and paste (my
> favourite) or b) object duplication (my next favourite)?
Quote: "If I could change one thing to improve the quality of our code,
it would be to disable the Copy/Paste button in the editor."
Now that may be an extreme position (and I can't remember where it comes
from either :-), but I think it has a lot of merit. There's not a lot of
perfect code in the world (*), so every time you duplicate code, you're
actually duplicating some bugs - so when you eventually find them,
you'll need to track down all the duplicates too.
That's why creation and use of functions, handlers and libraries is one
of the best *long-term* productivity boosters. It can make the initial
step take longer - to abstract out the correct functionality and put it
into a library - but in the long run it can save you.
OO simply takes that one step further, allowing you to apply the "share
commonality" principle more widely.
(*) even if you do have "bug-free" code, the world around you can change
in a way that requires changes in your code - and duplicates can be a
btw - "you" in the above paragraphs really means "me". I'm making no
assertions about anyone else's code; I know that my code always has
bugs, and that copy/paste has caused me a lot of heartache over the years.
Alex Tweedly http://www.tweedly.net
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 24/02/2006
More information about the Use-livecode