C++ frequently questioned answers
Bruce Adams
tortoise_74 at yeah.who.co.uk
Fri Oct 26 18:48:19 PDT 2007
Walter Bright Wrote:
> An interesting and sometimes amusing read:
>
> http://yosefk.com/c++fqa/
In amongst the religous fervour (of the defective C++ bit) there are some genuine points. The amusement comes from the obviously java biased/blinded viewpoint of the author. It seems to me the main retorts to this fqa is the C++ is spiderman retort "With great power comes great responsibility" another less polite one that comes to mind is the Harry Hill retort "If its too hard I can't understand it". Templates add a whole new dimension to typing that flatlanders find hard to grasp at first.
Leaving the poor education aside D seems to address all the genuine concerns except reflection and inlining. I know reflection will be added eventually but what about inlining. Isn't inlining available via mixins?
[OT]
Someone at work pointed out this java chestnut recently. If you've used java much you will know it but it may come as a shock to a mainly C++ coder.
class foo {
bar x;
void foo () {
x = new bar();
}
}
foo is NOT a constructor its actually a method named foo. The java compiler or interpreter generates a default constructor that sets all members to null so any use of x in any method of foo will result in a null pointer exception. This apparently compiles with no warnings.
[/OT]
More information about the Digitalmars-d
mailing list