Re: strong/weak typing and pointers
From: Michael Hobbs (mike_at_hobbshouse.org)
Date: 11/02/04
- Next message: apetchame_at_puntex.es: "MDaemon Warning - virus found: error"
- Previous message: Dan Perl: "Re: wxPython frame"
- Maybe in reply to: Gabriel Zachmann: "Re: strong/weak typing and pointers"
- Next in thread: Steven Bethard: "Re: strong/weak typing and pointers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 02 Nov 2004 15:31:36 -0000
Andrea Griffini <agriff@tin.it> wrote:
> You didn't mention C++. Try this ...
>
> std::string s = "Wow";
> s += 3.141592654; // Perfectly valid
> s = 3.141592654; // Also valid
Those automatic coercions are always handy when writing code, but a
pain in the @$$ when reading it. I can't count the number of times
that I stepped through C++ code, saying "what the ...?", only to
realize that there was some perlish 'operator +=(const **' statement
tucked away in a header file somewhere. Good riddance, I say. (My
code only overrides the __or__ operator. ;-)
-- Mike
- Next message: apetchame_at_puntex.es: "MDaemon Warning - virus found: error"
- Previous message: Dan Perl: "Re: wxPython frame"
- Maybe in reply to: Gabriel Zachmann: "Re: strong/weak typing and pointers"
- Next in thread: Steven Bethard: "Re: strong/weak typing and pointers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|