peter koch wrote:
Right. This confirms my suspicion that you really ought to learn C++
(and stop having those bad habits of copying code around "just
because").
Yes, you are right, we all always must learning, even Stroustup, i
think.
By the way, I am remembering a real situation in my life. Many days
ago, I first time saw C/C++. I open "incude" directory with headers and
take first file by random way. It was "obsolete.h"! At the moment one
man passed near and ask me: "hey, what the hell are you doing"? "I try
to learn C++" - I sad. ( the cause to laugh that I did not know what
the english word "obsolete" means ). The accident probably the cause of
all my problems - start define all process.
But return to you. In general, it will be better, if you will remain
your _suspicions_ for your internal usage, and here you can easy prove
your words by writing concrete examples, to show how the examples will
produce some of set of hard errors, for example, due to my "error style
declarations".
Sorry me, but without any suspicions, i can easy say, that you just can
_not_ do it, prefer instead of it declare many words of suspicions.
I agree, that man (Danny Kalev) who describe standard must be more
pedantic than pedanctic, but can repeat again - Glassborow was not
convincing, he just not listed very ugly obvious errors.
If that level is what you call "pedantic"
I sad, that any man (in the case it was Danny Kalev) must be pedantic,
if he is going to describe standard ("more
pedantic than pedanctic" is logical solid adjective).
All Glassborow examples less than 5% of size of his note, other about
him and comitee. Most engeneers ignore results, if value is less than
10% of other value :) All Glassborow examples is strange shortest parts
of unknown code, without any sence and original context.
That line just demonstrates that your ability to do arithmetic is on
par with your coding skills. Reread the review and you'll find that
about 40% of the review is about faults in the book.
About 40%? This is strange. The text is public.
This is full of Glassborow text [2414]:
[q]
I wish the publishers had not stated that the author is a member of the
ISO/ANSI C++ Standards Committees as it lends more authority to his
work than it deserves. To the best of my knowledge the author has never
attended a meeting of WG21 & J16. That is not to say that there is no
justification for the statement. Kalev is listed as an observer and is
entitled to participate in any of the C++ Standards reflectors that he
wishes to, however his is not a name that springs to mind as an active
participant (I do take almost all the C++ Standards reflectors and
think I am reasonably familiar with the active participants). I am only
mentioning this because I think readers should ignore this part of the
information on the back cover. On the other hand two of the three
members of the Technical Validation Group (TVG) are active members of
the C++ Standards Committees so you can be reasonably certain that the
technical content is basically sound (though not perfect). For example
the author seems to believe that implicit int is deprecated, it is not
because we actually removed it from the language (as did C in its
latest version).
There are other places that leave me less than happy. For example on
page 76 I find the following constructor definition:
Person(const char* name = NULL , int
age = 0) {}Look at that line carefully. That is more than a typo, and
the faults (one fatal and the other contrary to all texts on C++ style)
suggest very strongly to me that the TVG never looked at the text in
detail. In other words you would be wrong to assume that the text
carries the full endorsement of the members of the TVG. If you think I
am being picky, on the same page in a section titled Blocking Object
Copying he shows that he does not understand the full method because he
provides inline definitions (not just declarations) for the private
access copy constructor and assignment operator.
The end result is that we have a book that is very much a curates egg
(good in parts and rotten elsewhere). I am afraid that wipes it out for
its target readership. If you know enough to know the good from the
bad, you know enough not to need this book. I strongly recommend that
the publishers get the book fully technically reviewed and then publish
a substantially rewritten second edition. There is enough good to be
worth salvaging but there is too much bad mixed with it to justify its
price.
[/q]
This is useful part of Glassborow text [53]:
[q]
Person(const char* name = NULL , int
age = 0) {}
[/q]
Persent of useful text: (100 /*%*/ /2414)*53 = 2.196 /*%*/
No one (excluding Glassborow or you) can understand Glassborow's text:
1.
[q]
Person ...
[/q]
What is Person? Why are "name" and "age" present but never used?
2.
[q]
inline definitions (not just declarations) for the private access copy
constructor and assignment operator
[/q]
What is it? What kind of the "definitions" and where?
3.
[q]
implicit int is deprecated, it is not because we actually removed
[/q]
Yes, "deprecated" word used as "obsolete and produced warnings, not
errors, is not recommended to use in new programs, remained for
backward compatibility". There are differences between "deprecated" and
"removed", but maybe not in real compilers. And as context is absent,
it is ablsolutely not clear what the conclusion have been done by Kalev
for using "implicit int" in programs.
And even Kalev realy wrote, that "implicit int is deprecated and can be
used", and he never run compiler (gcc for example, which print exactly
"error: ISO C++ forbids declaration of 'var' with no type") it is not
_fatal_ error. In most cases is really does not metter - do not use
deprecated.
All others by random selection:
[q]
"best of my knowledge "
" C++ Standards reflectors "
"I am only mentioning "
" Technical Validation Group "
[/q]
evidently are not explanations.
Repeat third time - it is possible, that book of Kalev is set of
errors, but no one was listed by Glassborow and of course by you.