Boost logo

Boost Users :

From: Garriss, Michael (michael.garriss_at_[hidden])
Date: 2002-11-14 12:57:14


Keep in mind that Aleksey doesn't get paid for this and he answered your
mail on his "free" time. Cut him some slack! I thought his answers for
well written.

-Mike Garriss

-----Original Message-----
From: Sam Gentile [mailto:ManagedCode_at_[hidden]]
Sent: Thursday, November 14, 2002 9:29 AM
To: Boost-Users_at_[hidden]
Subject: RE: [Boost-Users] A strange question-)

Well at least you gave somewhat of an answer. I still want to understand
how those particular macros give that portability.

Sam Gentile
.NET Consultant
ManagedCode_at_[hidden]
http://www.samgentile.com
http://radio.weblogs.com/0105852/

-----Original Message-----
From: Jeff Garland [mailto:jeff_at_[hidden]]
Sent: Thursday, November 14, 2002 11:13 AM
To: Boost-Users_at_[hidden]
Subject: RE: [Boost-Users] A strange question-)

> <rant>
>
> How positively delightful to wait 24 hours and get a non-response like
> this. This is like pulling blood out of a stone. At this point, I'll

Sorry for your frustrations, but imagine the frustration of
the library author after yet another bizarre compiler error on
perfectly standard C++. Anyway, I think the answer was in the
previous mail: Portability. In an ideal world most of this
sort of macro hackery wouldn't exist. Unfortunately, boost exists
in the real world...

> just forget it and use something else. I do understand that Boost
users
> tend to be extremely advanced C++ users. For the record, I have been
> programming in C++ for well over 10 years and still get confused at
> some of the things you do. I am questioning and not understanding your
> approach at all. Why? Well, lets look at Stroustrup, 3rd edition page
> 160 "Macros are important in C, but have far fewer uses in C++. The
> first rule about macros is: Don't use them if you don't have to.
Almost
> every macro demonstrates a flaw in the program, or the programmer."
> Then "avoid macros." Now, I'm sure I'm missing your good reason but
there you
> go. To me, macros are an ugly legacy from C and render C++ code
> unreadable and maintainable. So, how detailed does my question have to
> be? I don't understand the whole approach and why it was taken. Is
that
> clear enough?

This viewpoint is just fine if you are creating a library for one
platform and compiler. The reality of the current world is that
many supposedly standard features of C++ or parts of the standard
library are not correct on many of the most common compilers. As
a result, if you write a library 'to the standard' it might not get
used much since it won't compile or work correctly for most people.
In addition, many boost libraries push compilers to the limits and
thus for some boost libraries the situation is even more severe.
The result is that many boost libraries use various macro techniques
to create portable code. Looking ahead a few years most of this will
hopefully disappear.

HTH,

Jeff

Info: <http://www.boost.org>
Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
Unsubscribe: <mailto:boost-users-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/

Info: <http://www.boost.org>
Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
Unsubscribe: <mailto:boost-users-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net