This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: I'm sorry, but this is unacceptable (union members and ctors)


On Wed, Jun 27, 2007 at 10:14:18PM -0700, michael.a wrote:
> >> For instance, say you need to impliment a GUI, so you have yourself a
> >> rectangle struct which consists of four floating point values (the origin
> >> and difference between the opposite corner) ...Now you want those four
> >> values, but you also have a 2D vector struct.
> ...
> I pointed this out as the obvious portable solution somewhere in the thread.
> I just firmly believe this is an unnecessarily back breaking way of going
> about it (and physically backbreaking for whoever would have to change all
> of the code) 
> It would be a blessing were intelligible code somewhat higher up on the
> rungs of c++ priorities (being the ever ubiquitous mainstay systems
> programming language it has become and will likely remain)

Minding reading has always been considered a blessing when it comes
to programming languages. Also, an impossibility.

I don't understand what is being requested. Have one structure with
four fields, and another with two, and allow them to be used
automatically interchangeably? How is this a good thing? How will
this prevent the implementor from making a stupid mistake?

Cheers,
mark

-- 
mark@mielke.cc / markm@ncf.ca / markm@nortel.com     __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

  One ring to rule them all, one ring to find them, one ring to bring them all
                       and in the darkness bind them...

                           http://mark.mielke.cc/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]