home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.object:3048 comp.lang.eiffel:1009
- Newsgroups: comp.object,comp.lang.eiffel
- Path: sparky!uunet!psinntp!bony1!richieb
- From: richieb@bony1.bony.com (Richard Bielak)
- Subject: Re: Class methods (was: Re: How to design a data structure library)
- Message-ID: <1992Jul28.201820.27793@bony1.bony.com>
- Organization: multi-cellular
- References: <5618@vexpert.dbai.tuwien.ac.at> <1992Jul27.155428.11825@bony1.bony.com> <graham.712283419@galois>
- Date: Tue, 28 Jul 92 20:18:20 GMT
- Lines: 37
-
- In article <graham.712283419@galois> graham@maths.su.oz.au (Graham Matthews) writes:
-
- [...]
-
- >
- >Are you really serious about this notation Richie? This means that
- >I would have to write integer addition as
- >
- > !!c.+(6,7);
- >
- >After all it creates a new integer!
- >
-
- It's not the notation that I'm arguing for.
-
- !!c.+(6,7) is certainly awful syntax. But, (as Jim McKim suggested in
- private e-mail) couldn't the compiler do the translation from c := 6 +
- 7; to the above monstrocity.
-
- My point is that certain methods, "+" for example, should be class
- (i.e. creation) methods.
-
- However, once you get away from numbers, with their historical
- notation, things make more sense. How about a "concat" method on
- strings. We'd have:
-
- !!s.concat("foo", junk);
-
-
-
- ...richie
-
- --
- * Richie Bielak (212)-815-3072 | "Your brain is a liquid-cooled parallel *
- * Internet: richieb@bony.com | super-computer". He pointed to his nose, *
- * Bang {uupsi,uunet}!bony1!richieb | "This is the fan." *
- * - Strictly my opinions - | - David Chudnovsky - *
-