/sys/doc/ Documentation archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lucent Technologies & Sun Microsystems



Without speaking for anyone else, I've fallen off the OO
bandwagon for several reasons:

1) Relatively few parts of computer programs are well represented
    as objects.   While most parts of computer programs *can*
    be represented as objects, most objects don't offer much
    simplification.  My test for whether an object is appropriate
    is "Does turning X into an object allow for shorter, simpler
    documentation that is easier to remember?"   Often, the
    answer is no; there are many horrible examples of 'classes'
    that are merely bags full of loosely related functions.

    The objects that always pass that test are character strings,
    lists, arrays, hash tables, and one or two others.  Limbo
    has all but hash tables and FIFOs.  It should be noted
    that character string classes in C++ usually fail the test,
    because you usually have to know too much of the internal
    workings in one special case or another.

2) OO programming styles spatter information all over the place.
    A class is not defined anywhere specific; one has to hop
    around looking at all the class definitions of members and
    superclasses.   This means that (in a heavily OO program)
    you might have to understand a dozen classes to see what
    a particular bit of code does.

That being said, I'd like to see constructors and maybe single
inheritance in Limbo.