I have lurked for several months now, and find that I can hold my tongue
no longer.  The 'discussion' of overloading '+', to include concatenation,
suffers from a general degeneration into implementation details, where
linguistic sentiment should reign.

The contention that '+' should be overloaded is based in machine details,
expressed in other languages through 'types'.  In this model of the world,
a 'string' is fundamentally different from a 'number', and as such each defines
a specific context in which the operator exists: (string) + (string) or
(number) + (number), or some horrid abberation thereof, which aught not
to be.

The traditional perl vision, however, holds these divergent things to
be both one and the same. But in this, a scalar is really neither a number 
nor a string.  From the point of view of the C++ programmer, there is only  
a single context which applies, the scalar context: (scalar) + (scalar).

Perl's clever solution to how to interpret what a scalar 'means' is to define
vocabulary which provides the context.  The manner in which the symbol
123 is interpreted depends on the operator, and not the other way round as is
the case in C, C++, Java, Ruby.  Perl is beautiful because you are manipulating
a symbol and not just a series of bits.

I'm sorry, and I apologize for this rant, but I feel that the arguments on
both side of what to do with '.' and '+' have bogged themselves down in
a discussion based on how one represents a symbol on the machine's level,
forgetting about the human one.  The correct choice is a matter of 'human'
intuition and not 'computer programmer' intuition, we have bent our minds
too far to accomodate the machines.

(BTW: I read Chip Salzenberg's perl code all day at work, so go easy on me :)

-- 

david j. goehrig                bit twiddler            www.valinux.com

"There was nothing creative, charming, admirable or innovative in
Pokémon except that it parted small children from their
money with brutal efficiency. It inexplicably featured the
dramatic story of cockfighting monsters who lived in your pants..."

                                - John Tynes

Reply via email to