From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1108a1,c52c30d32b866eae X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,2ea02452876a15e1 X-Google-Attributes: gid103376,public X-Google-Thread: fac41,c52c30d32b866eae X-Google-Attributes: gidfac41,public From: jhd@herold.franken.de (Joachim Durchholz) Subject: Re: Real OO Date: 1996/04/30 Message-ID: <67pyQC9k3RB@herold.franken.de>#1/1 X-Deja-AN: 152644956 references: newsgroups: comp.lang.eiffel,comp.lang.ada,comp.object Date: 1996-04-30T00:00:00+00:00 List-Id: dewar@cs.nyu.edu wrote 30.04.96 on Re: Real OO: > [Stuff on overzealous language design goals deleted] I wholeheartedly agree. > The world of operations and types can be though of as a matrix: > > type 1 type 2 type 3 ... > > op1 x - x > op2 - x - > op3 x x - > ... > > Roughtly speaking, the OO approach organizes by columns, which is often > fine, but the operation organization by rows also often makes sense. I'm not too sure wether this actually makes much sense. Usually, if you have related functions, they work on similar types. Basically, this observation is the reason why OO is better suited than functional decomposition. And you're right, making the class the only way to structure a program (or library) takes things too far. There should be a place to put all the trigonometric etc. functions even after class REAL (or REAL_INTERVAL or FRACTION or whatever) has been defined, implemented, and closed for good. Still, you can create a mixin class. Such a class would be a function library in disguise, but it would work. I don't even think it is distasteful to abuse the class mechanism in this way. It is just the same as with subroutines and local variables - often I don't need more than a name for a chunk of code, but I don't have macros, I must use a subroutine, and I don't even think much about it. -Joachim -- Im speaking for myself here.