http://groups.google.com/group/comp.lang.c++?hl=en
comp.lang.c++@googlegroups.com
Today's topics:
* Interesting book reference - 4 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/a27de2b3d6558b10?hl=en
* book on C++ problems - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/1cafb777921395c1?hl=en
* 'global' data - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/9e49fb086b308086?hl=en
* The best way to retrieve a returned value... by const reference? - 2
messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/0f3ad790abe791fc?hl=en
* C++ way to convert ASCII digits to Integer? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/c6620161a9dfea0b?hl=en
* <<<www.shoesspring.com>>>> Look more Nike running shoes,af1 sneakers,NFL
Jerseys,paypal payment. - 4 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/00b30575dfed68d5?hl=en
==============================================================================
TOPIC: Interesting book reference
http://groups.google.com/group/comp.lang.c++/t/a27de2b3d6558b10?hl=en
==============================================================================
== 1 of 4 ==
Date: Thurs, May 28 2009 2:26 pm
From: Phlip
Ioannis Vranos wrote:
> "CRITICAL SKILL 1.1: A Brief History of C++
Ooh, a Schildt Bashing Thread!
> The history of C++ begins with C. The reason for this is easy to
> understand: C++ is built upon the
> foundation of C. Thus, C++ is a superset of C. C++ expanded and enhanced
> the C language to support
> object-oriented programming (which is described later in this module).
> C++ also added several other
> improvements to the C language, including an extended set of library
> routines. However, much of the
> spirit and flavor of C++ is directly inherited from C. ==> Therefore, to
> fully understand and appreciate C++,
> you need to understand the "how and why" behind C".
Ho hum ... C++ is not a "superset" if it also redefines a few C things, like
void* grammar ... whatever. I don't see how writing the word "superset" there
will corrupt the youth of America.
Next, we all know that the best way to learn C++ is as a high-level language,
starting at the non-C things like std::string. The /Ruminations on C++/ approach
by Koenig, IIRC. Learn C when its time to debug array overruns (like you can get
even with std::string.)
Could you go in after some raw details that suck? I doubt, this late, you will
find a 'void main' - even when describing a MS product.
And whose names are in the Acknowledgements? Any VC++ bigwigs we know?
--
Phlip
== 2 of 4 ==
Date: Thurs, May 28 2009 3:57 pm
From: Ioannis Vranos
Phlip wrote:
> Ioannis Vranos wrote:
>
>> "CRITICAL SKILL 1.1: A Brief History of C++
>
> Ooh, a Schildt Bashing Thread!
>
>
> Could you go in after some raw details that suck? I doubt, this late,
> you will find a 'void main' - even when describing a MS product.
>
> And whose names are in the Acknowledgements? Any VC++ bigwigs we know?
Actually there are many details that I thing are wrong or quite inaccurate, when taking quick looks at chapter
1 pdf.
For example this paragraph:
"==> C++ is the parent for both Java and C#. Although both Java and C# added, removed, and modified
various features, in total the syntax for these three languages is nearly identical. Furthermore, the
object model used by C++ is similar to the ones used by Java and C#. Finally, the overall "look and feel"
of these languages is very similar. ==> This means that once you know C++, you can easily learn Java or C#.
==> The opposite is also true. ==> If you know Java or C#, learning C++ is easy. ==> This is one reason that
Java and C# share C++'s syntax and object model; it facilitated their rapid adoption by legions of experienced
C++ programmers".
--
Ioannis A. Vranos
C95 / C++03 Developer
== 3 of 4 ==
Date: Thurs, May 28 2009 4:00 pm
From: Ioannis Vranos
Phlip wrote:
>
> And whose names are in the Acknowledgements? Any VC++ bigwigs we know?
I didn't find any acknowledgements so far, but I have only taken a look at chapter 1 a bit.
--
Ioannis A. Vranos
C95 / C++03 Developer
== 4 of 4 ==
Date: Thurs, May 28 2009 8:41 pm
From: Phlip
Ioannis Vranos wrote:
> For example this paragraph:
>
> "==> C++ is the parent for both Java and C#.
You selecting the exact paragraph to motivate me. Regardless of Java's
advertising copy, it has nothing to do with C++. Further, C++ is a member of a
healthy family tree of living "C languages", including Objective-C (and
Objective-C++!), various reference implementations, and the new forthcoming
standards. Actually researching those relations would have added a lot of value
here.
And C# is nothing but Java with some keywords search-replaced. Calling Java a C
language is like calling JavaScript both a C language and a Java language -
because they all have curly braces {} in common! 'Nuff said.
> This means that once you know
> C++, you can easily learn Java or C#.
Then he goes for the exact crucial reason not to compare C++ to those pieces of
pure shit. Anyone deluded into thinking C++ gets them any closer to Java/C# is
headed for the kind of nasty surprise that wastes a lot of time and effort.
Thanks! I needed to do some bashing today, but your first 'graph simply was not
doing it for me! (-:
--
Phlip
==============================================================================
TOPIC: book on C++ problems
http://groups.google.com/group/comp.lang.c++/t/1cafb777921395c1?hl=en
==============================================================================
== 1 of 2 ==
Date: Thurs, May 28 2009 2:59 pm
From: Jeff Schwab
bubai wrote:
> I am a professional C++ programmer with 4+ years of
> experience.... to further enhance my skills I am looking for a good
> book which has got lot of C++ problems and solutions specially
> intermediary or expert level problems... any recommendation will be
> highly appreciated.
Is there anything in particular you'd like to learn about? Software
engineering in general, or template basics, or advanced template
meta-programming, ... ?
== 2 of 2 ==
Date: Thurs, May 28 2009 5:34 pm
From: "Balog Pal"
"bubai" <ayansinhas@gmail.com>
> I am a professional C++ programmer with 4+ years of
> experience.... to further enhance my skills I am looking for a good
> book which has got lot of C++ problems and solutions specially
> intermediary or expert level problems... any recommendation will be
> highly appreciated.
Imperfect C++: Practical Solutions for Real-Life Programming (Paperback)
by Matthew Wilson (Author)
http://www.amazon.com/Imperfect-Practical-Solutions-Real-Life-Programming/dp/0321228774
and you can follow the similarity references too
==============================================================================
TOPIC: 'global' data
http://groups.google.com/group/comp.lang.c++/t/9e49fb086b308086?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, May 28 2009 4:13 pm
From: forums_mp@hotmail.com
On May 19, 8:30 am, Jeff Schwab <j...@schwabcenter.com> wrote:
[...]
> #include <iostream>
>
> namespace app {
>
> bool was_here1, was_here2;
>
> struct kilroy { kilroy( bool& was_here ) { was_here = true; } };
>
> namespace internal {
>
> template<typename Dummy>
> struct math { static kilroy k1, k2; };
>
> template<typename Dummy> kilroy math<Dummy>::k1( was_here1 );
> template<typename Dummy> kilroy math<Dummy>::k2( was_here2 );
> }
>
> typedef internal::math<void> math;
>
> void main() {
> std::cout
> << &math::k1 << '\n' // Instantiate k1, but not k2.
> << was_here1 << '\n' // 1
> << was_here2 << '\n'; // 0
> }
>
> }
>
> int main() { app::main(); }
Got sidetracked for a minute, nonetheless, I'll take a look at your
suggestion in a minute. In the interim. Consider
// types.h
# ifndef TYPES_H
# define TYPES_H
namespace TEST
{
template<class T>
std::string to_string( const T& t )
{
std::ostringstream oss;
oss << t;
return oss.str();
}
template < typename T >
struct Defines
{
static int const addr_base ;
static int const offset ;
static double const bogus ;
static int const stat_cntrl_base[ 4 ] ;
static int const test ;
};
}
template< typename Dummy> int const TEST::Defines<Dummy>::addr_base
= 5;
template< typename Dummy> int const TEST::Defines<Dummy>::offset
= 15;
template< typename Dummy> double const TEST::Defines<Dummy>::bogus
= 6;
template< typename Dummy> int const
TEST::Defines<Dummy>::stat_cntrl_base[ 4 ] = { 0x0000, 0x0800, 0x1000,
0x1800 };
template< typename Dummy> int const TEST::Defines<Dummy>::test
= template< typename Dummy> int const
TEST::Defines<Dummy>::offset +
template< typename Dummy> int const
TEST::Defines<Dummy>::addr_base;
typedef TEST::Defines<void> MTEST;
# endif
// main.cpp
# include "types.h"
int main() {
std::cout << MTEST::addr_base << std::endl;
std::cout << MTEST::bogus << std::endl;
std::cout << MTEST::stat_cntrl_base [ 2 ] << std::endl;
std::cout << MTEST::test << std::endl;
std::cin.get();
}
The member test is equal to offset + base, I'm confused on how to
handle the member 'test' with the template const trick. I guess the
approach I presented above is not valid syntax so I'm unsure how to
rectify this.
==============================================================================
TOPIC: The best way to retrieve a returned value... by const reference?
http://groups.google.com/group/comp.lang.c++/t/0f3ad790abe791fc?hl=en
==============================================================================
== 1 of 2 ==
Date: Thurs, May 28 2009 5:28 pm
From: "Balog Pal"
"Niels Dekker
> Thanks, Balog. Unfortunately there is a real point against this form: if
> you're calling a virtual function of Foo through a reference to a
> temporary Foo object, it won't be inlined by the compiler.
This leads to different fields. If you deal with hierarchy objects, and
copy them, ther is a danger of slicing. The reference form is safe wrt.
this, it preserves the dynamic type of the returned object, while the other
form forces it to the marked type.
The different code for calls comes from this same thing: if you have a
concrete object, function calls are nonvirtual (even for virtual function).
Therefore they can be inlined.
If there is a reference, the calls are virtual through the VMT. (Okay, the
compiler could follow how how the ref got initialized, but it's well beyond
trivial.)
My experience shows that object hierarchies are not so frequently used these
days in C++ (I mean correctly ;-) and where they are used, having the
virtual calls is hardly an issue to worry about.
== 2 of 2 ==
Date: Thurs, May 28 2009 5:41 pm
From: "Alf P. Steinbach"
I decided to respond to the first post in cl++, and this was it.
* Balog Pal:
> "Niels Dekker
>> Thanks, Balog. Unfortunately there is a real point against this form: if
>> you're calling a virtual function of Foo through a reference to a
>> temporary Foo object, it won't be inlined by the compiler.
>
> This leads to different fields. If you deal with hierarchy objects, and
> copy them, ther is a danger of slicing.
I think you mean a hierarchy of classes. :-)
Anyways, you're right that many C++ class hierarchies, perhaps the great
majority, are evidently designed by folks who haven't understood that a
restriction to correct usage needs to be designed in.
In short, if slicing is a problem, then slicing shouldn't be allowed, by design.
> The reference form is safe wrt.
> this, it preserves the dynamic type of the returned object, while the other
> form forces it to the marked type.
The problem with reference as a routine result is more the lifetime isssue and
the design issue of allowing the caller to use non-const methods.
How long is that reference valid?
Can the caller modify the object without breaking assumptions in the class of
the routine that provided the reference?
Will the design be practical with a restriction to const result?
Correctness and usability are far more important than micro-efficiency.
> The different code for calls comes from this same thing: if you have a
> concrete object, function calls are nonvirtual (even for virtual function).
> Therefore they can be inlined.
>
> If there is a reference, the calls are virtual through the VMT. (Okay, the
> compiler could follow how how the ref got initialized, but it's well beyond
> trivial.)
This focus on micro-efficiency is (in general) just evil premature optimization.
In general call efficiency should not be a concern.
It prevents you from focusing on issues that do matter (see above).
> My experience shows that object hierarchies are not so frequently used these
> days in C++ (I mean correctly ;-) and where they are used, having the
> virtual calls is hardly an issue to worry about.
I think you mean a hierarchy of classes. :-)
Cheers & hth.,
- Alf
--
Due to hosting requirements I need visits to <url: http://alfps.izfree.com/>.
No ads, and there is some C++ stuff! :-) Just going there is good. Linking
to it is even better! Thanks in advance!
==============================================================================
TOPIC: C++ way to convert ASCII digits to Integer?
http://groups.google.com/group/comp.lang.c++/t/c6620161a9dfea0b?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, May 28 2009 6:13 pm
From: blargg.ei3@gishpuppy.com (blargg)
Pete Becker wrote:
> Drew Lawson wrote:
> > Default User writes:
> >> Pete Becker wrote:
> >>> Default User wrote:
> >>>> Pete Becker wrote:
> >>>> That really depends on circumstances. For the most part in my
> >>>> career as a software engineer, supervisors have not created
> >>>> specifications to that level.
> >>> If you ignore a specification because you think it's wrong you're
> >>> simply wrong. If you're winging it without specifications you have a
> >>> completely different set of issues.
> >> I'm not following. My superviors have not typically set requirements to
> >> that level. That is to say, the broad strokes of task are set, and the
> >> engineers will define and implement the lower-level requirements.
> >
> > I take it that Pete's intrpretation is that, if your supervisor
> > says "ASCII," then ASCII is a carved-in-stone requirement that you
> > need to meet. My take, and possibly yours, is that some of my
> > supervisors (like maky Usenet posters) would say "ASCII" but mean
> > "text."
>
> No, that's obvious nonsense. What I said is that if you think ASCII is
> wrong, ask about it.
And by asking, you avoid taking things into your own hands, help them use
the correct terminology in the future (if text is what they really meant),
and show that you are paying attention. I wouldn't want to work with
someone who went and implemented something differently than what we agreed
on, just because he thought he knew better (or thought it was wrong but
went and implemented it without mentioning the apparent problem to me).
==============================================================================
TOPIC: <<<www.shoesspring.com>>>> Look more Nike running shoes,af1 sneakers,
NFL Jerseys,paypal payment.
http://groups.google.com/group/comp.lang.c++/t/00b30575dfed68d5?hl=en
==============================================================================
== 1 of 4 ==
Date: Thurs, May 28 2009 11:07 pm
From: wholesale plaza
Sneaker Wholesale ,sand shoes,D&G,high-heel
shoes,NBA,NIKE,soccer,Max one,converse www.shoesspring.com
Sneaker Wholesale ,bape hoodies,jacket,dust
coat,shirt, CLH hoody, rmc jeans,short jeans,lacoast shirt,
(www.shoesspring.com)
Sneaker Wholesale ,diesel jeans,paul smith,red
monkey jeans,5ive jungle hoody,AMANI shirt,antik jeans
(www.shoesspring.com)
Sneaker Wholesale ,enyce jeans,roca wear,lrg
jeans,hoodie,shirt,polo t-shirt,evise hoody,coat,ED hardy
(www.shoesspring.com)
Sneaker wholesale ,hoody,skirt,BBC
hoody,jeans,shirt,10deep jeans,shirt,AK t-shirt,LA t-shirt,new york
city t-shirt,kidrobot hoody, (www.shoesspring.com)
Sneaker Wholesale ,ugg shirt,hoodies,jeans,APE
jeans,hoody,F1 coat shirt,Gucci jeans,hoody,shirt,BRM shirt,G-STAV
shirt,T y-shirt, (www.shoesspring.com)
Sneaker Wholesale ,D&G jeans,shirt,Artful Dudger
shirt,hoody (www.shoesspring.com)
Sneaker Wholesale ,backpack,purse,Adidas
bag,cover nut,NIKE bag,GIORGIO handbag,CHLOE handbag,CHENEL
handbag,LV
handbag,coach (www.shoesspring.com)
Sneaker Wholesale ,football club
hat,adidas,puma,new bape,lrg ,evisu,new era, NBA , nike,new
era ,A&F,usa , gucci hat,bape, ED hardy (www.shoesspring.com)
Sneaker Wholesale ,Air Force One,Air
Jordans1-22, Jordan2.2,Jordan2.5,3.5,4.5, 6.5,7.5,13.5,15.5,21.5.
(www.shoesspring.com)
Sneaker Wholesale, Air Max90, 95,97,Air Max95
360, Air Max 180,women Air Max95,97 ,Air max TN.
(www.shoesspring.com)
== 2 of 4 ==
Date: Thurs, May 28 2009 11:17 pm
From: wholesale plaza
Get nike shoes at wholesale cheap price
wholesale discount nike air (paypal payment) (www.shoesspring.com)
cheapest nike air max90 shoes (paypal payment)
(www.shoesspring.com)
nike maxltd shoes
cheap gucci sneakers,prada sneakers (www.shoesspring.com)
cheap jordan sneakers (www.shoesspring.com)
nike shoes wholesale in china
discount chanel gucci shoes wholesale (www.shoesspring.com)
jordan sneakers www.shoesspring.com
cheapest puma sneakers www.shoesspring.com
wholesale (paypal payment) www.shoesspring.com
dsquared shoes wholesale in china www.shoesspring.com
cheap wholesale tiffnay jewelry www.shoesspring.com
gucci shoes shop,prada shoes shop (paypal payment) www.shoesspring.com
nike customes
authentic nike shoes,nike jordan sneakers (www.shoesspring.com)
wholesale cheap jordan,nike free shoes (www.shoesspring.com)
wholesale lacoste tshirt wholesale nike dunk
sneakers wholesale gucci prada sneakers wholesale bbc evisu jeans
(www.shoesspring.com)
wholesale authentic g-star true religion jeans
(www.shoesspring.com)
ed hardy caps,ed hardy caps cheap,ed hardy cap for cheap
(www.shoesspring.com)
bulk air force one for sell (www.shoesspring.com)
burberry tshirt for cheap (paypal payment (www.shoesspring.com)
adidas goodyear (paypal payment)
juicy suit wholesale (www.shoesspring.com)
wholesale armani shirt (www.shoesspring.com)
buy nike shoes at wholesale cheap price (www.shoesspring.com)
wholesale discount nike air force one shoes (www.shoesspring.com)
cheapest nike air max90 shoes nike maxltd shoes (paypal payment)
cheap gucci sneakers,prada sneakers (paypal payment)
(www.shoesspring.com)
cheap jordan sneakers (www.shoesspring.com)
GUCCI bags ( paypal payment)
LV bags D&G bags CLOTHES
== 3 of 4 ==
Date: Thurs, May 28 2009 11:36 pm
From: wholesale plaza
Get nike shoes at wholesale cheap price
wholesale discount nike air (paypal payment) (www.shoesspring.com)
cheapest nike air max90 shoes (paypal payment)
(www.shoesspring.com)
nike maxltd shoes
cheap gucci sneakers,prada sneakers (www.shoesspring.com)
cheap jordan sneakers (www.shoesspring.com)
nike shoes wholesale in china
discount chanel gucci shoes wholesale (www.shoesspring.com)
jordan sneakers www.shoesspring.com
cheapest puma sneakers www.shoesspring.com
wholesale (paypal payment) www.shoesspring.com
dsquared shoes wholesale in china www.shoesspring.com
cheap wholesale tiffnay jewelry www.shoesspring.com
gucci shoes shop,prada shoes shop (paypal payment) www.shoesspring.com
nike customes
authentic nike shoes,nike jordan sneakers (www.shoesspring.com)
wholesale cheap jordan,nike free shoes (www.shoesspring.com)
wholesale lacoste tshirt wholesale nike dunk
sneakers wholesale gucci prada sneakers wholesale bbc evisu jeans
(www.shoesspring.com)
wholesale authentic g-star true religion jeans
(www.shoesspring.com)
ed hardy caps,ed hardy caps cheap,ed hardy cap for cheap
(www.shoesspring.com)
bulk air force one for sell (www.shoesspring.com)
burberry tshirt for cheap (paypal payment (www.shoesspring.com)
adidas goodyear (paypal payment)
juicy suit wholesale (www.shoesspring.com)
wholesale armani shirt (www.shoesspring.com)
buy nike shoes at wholesale cheap price (www.shoesspring.com)
wholesale discount nike air force one shoes (www.shoesspring.com)
cheapest nike air max90 shoes nike maxltd shoes (paypal payment)
cheap gucci sneakers,prada sneakers (paypal payment)
(www.shoesspring.com)
cheap jordan sneakers (www.shoesspring.com)
GUCCI bags ( paypal payment)
LV bags D&G bags CLOTHES
== 4 of 4 ==
Date: Thurs, May 28 2009 11:48 pm
From: peter
Get nike shoes at wholesale cheap price
wholesale discount nike air (paypal payment) (www.shoesspring.com)
cheapest nike air max90 shoes (paypal payment)
(www.shoesspring.com)
nike maxltd shoes
cheap gucci sneakers,prada sneakers (www.shoesspring.com)
cheap jordan sneakers (www.shoesspring.com)
nike shoes wholesale in china
discount chanel gucci shoes wholesale (www.shoesspring.com)
jordan sneakers www.shoesspring.com
cheapest puma sneakers www.shoesspring.com
wholesale (paypal payment) www.shoesspring.com
dsquared shoes wholesale in china www.shoesspring.com
cheap wholesale tiffnay jewelry www.shoesspring.com
gucci shoes shop,prada shoes shop (paypal payment) www.shoesspring.com
nike customes
authentic nike shoes,nike jordan sneakers (www.shoesspring.com)
wholesale cheap jordan,nike free shoes (www.shoesspring.com)
wholesale lacoste tshirt wholesale nike dunk
sneakers wholesale gucci prada sneakers wholesale bbc evisu jeans
(www.shoesspring.com)
wholesale authentic g-star true religion jeans
(www.shoesspring.com)
ed hardy caps,ed hardy caps cheap,ed hardy cap for cheap
(www.shoesspring.com)
bulk air force one for sell (www.shoesspring.com)
burberry tshirt for cheap (paypal payment (www.shoesspring.com)
adidas goodyear (paypal payment)
juicy suit wholesale (www.shoesspring.com)
wholesale armani shirt (www.shoesspring.com)
buy nike shoes at wholesale cheap price (www.shoesspring.com)
wholesale discount nike air force one shoes (www.shoesspring.com)
cheapest nike air max90 shoes nike maxltd shoes (paypal payment)
cheap gucci sneakers,prada sneakers (paypal payment)
(www.shoesspring.com)
cheap jordan sneakers (www.shoesspring.com)
GUCCI bags ( paypal payment)
LV bags D&G bags CLOTHES
==============================================================================
You received this message because you are subscribed to the Google Groups "comp.lang.c++"
group.
To post to this group, visit http://groups.google.com/group/comp.lang.c++?hl=en
To unsubscribe from this group, send email to comp.lang.c+++unsubscribe@googlegroups.com
To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.c++/subscribe?hl=en
To report abuse, send email explaining the problem to abuse@googlegroups.com
==============================================================================
Google Groups: http://groups.google.com/?hl=en
No comments:
Post a Comment