🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.objective-c
Article #231

Re: Inheritance question

#231
From: Thomas Oeser (SNI AP 153)
Date: Thu, 07 Feb 1991 15:14
34 lines
1993 bytes
In article <25258@grebyn.com>, dougw@grebyn.com (Doug Worthington) writes:
|> 
|>		*** stuff deleted *** 
|> 
|>         My problem is this.  I want the user to get and set these
|> fields with the same routine names getValue and setValue without
|> having to cast the value as an char *, int etc.  When the user
|> includes the interface files with the program the compiler is confused
|> with the names complaining that there are more then one get/setValues.
|> Which there are, one for each type of field with a different
|> return/parameter type.  This lack of overloading is a bummer.  I
|> realize I am a bit braindead on this problem but why can't the
|> compiler do some scoping of the arguements and determine which method
|> to call.


The best (on also object oriented!) way to solve this problem is to use OBJECTS as
parameters of getValue() and setValue(). Having, a proper superclass, amy subclass
will fit...


Thomas Oeser


****** DISCLAIMER: All opinions stated here are strictly my own *********
-------------------------------------------------------------------------
Internet:	thomas%apgraph%ap542@ztivax.siemens.com
Europe:		thomas%apgraph%ap542@ztivax.UUCP
Phone:		+ 49 89 636 47537
Fax:		+ 49 89 636 45522
Postal Mail:	Siemens Nixdorf Information Systems AG, AP 153,
                Carl-Wery-Str. 22, D-8000 Munich 83, West Germany
-------------------------------------------------------------------------
Technical Details
Message-ID: <1291@ap542.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!unido!ztivax!ap542!tomnews
References: <25258@grebyn.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!unido!ztivax!ap542!tomnews
From: tomnews%apgraph@ap542.UUCP (Thomas Oeser (SNI AP 153))
Newsgroups: comp.lang.objective-c
Subject: Re: Inheritance question
Message-ID: <1291@ap542.uucp>
Date: 7 Feb 91 15:14:36 GMT
References: <25258@grebyn.com>
Sender: news@ap542.uucp
Reply-To: tomnews%apgraph@ap542.UUCP (Thomas Oeser (SNI AP 153))
Distribution: comp.lang.objective-c
Organization: Siemens Nixdorf Informationssysteme AG
Lines: 34