Derek M Jones <[EMAIL PROTECTED]> wrote:
        The language assumption I make is that relative occurrence of
        operators is the same across languages.

I don't see any reason to believe that.
>From my little study (examining a program Derek Jones has), we know
that the relative occurrence of operators isn't the same across
programs within ONE language, so why should it be the same across
languages?

        I have heard people claim
        that object orientation changes language usage completely.

If you consider "." and "->" as operators (which I don't), then
it *has* to make a large difference.  If you consider "_[_]" as
an operator (which I do), then again, it has to make a large
difference.

Let me offer the obvious point that we know that operator usage is
quite different between C and C++ for the simple reason that C++ has
overloaded << and >> .  In C, << and >> are moderately rare operators
meaning only bitwise shift.  In C++, they are also frequent operators
meaning input/output.

And there's another issue, not really OO as such, but a distinction
between languages like Fortran and Ada, with abstract data types,
and languages like Pascal and C, without them.  Suppose I have two
vectors.

    Fortran:            x = y + z
    Ada:                x := y + z;
    C++:                x = y + z;

    C, Java:            for (i = 0; i < n; i++) x[i] = y[i] + z[i];

        While OO may change a developers perception of algorithms I
        don't think it has much impact on things like operator usage.

If it doesn't, then people are doing it wrong.  What's OO for if not
to hide complex code and make it simply reusable?

        > I also note that you titled your paper "Developer beliefs
        > about binary operator precedence", yet I don't actually see anything
        > in your paper that supports the contention that you know what
        > those beliefs are.  Perhaps I missed it.
        
        I set out to find out what those beliefs were by asking them to
        answer precedence problems.
        
There's what people BELIEVE and what they DO; they are different things.
If nothing else, there's Chomsky's competence/performance distinction.
In particular, what people think when they have *time* to reflect may
be very different from what they do under time pressure.

The way to find out what people believe is to ask them.

 
----------------------------------------------------------------------
PPIG Discuss List (discuss@ppig.org)
Discuss admin: http://limitlessmail.net/mailman/listinfo/discuss
Announce admin: http://limitlessmail.net/mailman/listinfo/announce
PPIG Discuss archive: http://www.mail-archive.com/discuss%40ppig.org/

Reply via email to