🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.eiffel
1 messages
1 total messages Started by day@grand.UUCP ( Wed, 21 Dec 1988 18:18
reusability of code in object oriented design
#18
Author: day@grand.UUCP (
Date: Wed, 21 Dec 1988 18:18
31 lines
1572 bytes
From: "Andrew K. Wright" <akwright@watmath.waterloo.edu>
Date: Thu, 24 Nov 88 13:48:48 EST

In most object oriented languages, when a new class is defined,
its operations are implicitly reusable by a subclass.  That is,
without the user going to any effort, any code (operations) written
are reusable.  In fact, object oriented languages in which the user
can indicate that code, or a class, is NOT reusable are few.

I have the feeling that in order to create a class with a fair
chance of being reused, the user must be intending to create
a reusable class.  In C++, this is, in some ways, required by the
language: the "virtual" keyword must be used by the class designer
if a derived class is to redefine parent class operations and behave
properly.  This is not true of Eiffel (each operation is implicitly
virtual).

In order to gather some feedback about what other object-oriented
designers have encountered, I will challenge the notion that
classes can be designed without the intent of reuse, and effectively
reused later.  I contend that only through freak accidents are
classes reused, unless they were intended for reuse.  Thus
C++ classes containing "virtual", and Eiffel classes containing
"deferred" are definitely not eligible, because they were clearly
intended for reuse.  Classes which had to be modified to achieve reuse
do not count either.  What percentage of your classes which you
did not originally intend to reuse do you actually derive from?

Andrew K. Wright      akwright@watmath.waterloo.edu
CS Dept., University of Waterloo, Ont., Canada.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads