Comment Re:No problem at all, on the contrary (Score 1) 373
Good people? Who need to go to a special school to learn to code? Yep, hire all you want out of this pool.
Good people? Who need to go to a special school to learn to code? Yep, hire all you want out of this pool.
Thank you. From a SJW this is a compliment.
Interesting language. I like it. At least from its name I think I like it. I think I use it to code a new compression program... don't know... perhaps something with 'bro' in it. Can I compile with: Coq bro?
I see it as a useful marker: Attended this school? Don't hire at any cost. Risk to get a destructive feminazi is just too high.
Choose a random women: "You now develop open source software".
She refuses? Bullet to the head. Ask a second one. She refuses? Bullet to the head. Quite sure the third will happily start coding. Rince/repeat until desired ratio is reached.
It is always funny to see how identical the responses of the apes... sorry believers... are when one points to their barbarity.
Communism: There never was communism. Stalin was no communist. Pretended to be communist for his political agenda. Yadda, yadda.
"Chrisianism": No, no, not those where not Christians. Those were Atheists. Pretending to be Christians for their political agenda. Yadda, yadda.
Btw... it does not matter about what Hitlers spoke in this video. It matters that the claims the a Christian. And he was. A very good one.
The Fascists were atheist.
Repeating it over and over again, does not make it true. But truth never had much significance for Christians.
https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DYP_iNCGH9kY%2F
https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DSz42hBg4jys%2F
I thought the new one was FF3+N.
but neither mythbusters nor breaking bad is going to tell us (probably some mix of acids, paying attention to the molar concentrations)
But I do:
Coming from Disney I really was surprised that it wasn't Ant Woman. And not black. And not lesbian.
Meeting once a month. It is free. Roughly 10-20 members. I learned plenty there. It is very interesting since the members come from all kinds of backgrounds. The techniques an methods of C++ developers vary tremendously. What has this to do with this article? Simple, in all my years in this group I did not see a single parasite there.
You should read this:
http://en.cppreference.com/w/c...
If no user-defined constructors of any kind are provided for a class type (struct, class, or union), the compiler will always declare a default constructor as an inline public member of its class.
So your Because: it has no ctor!! is definitely wrong. There are no structs, classes, or unions without a constructor. Never. Right is that i in B is not initialized because:
If the implicitly-declared default constructor is not deleted or trivial, it is defined (that is, a function body is generated and compiled) by the compiler, and it has exactly the same effect as a user-defined constructor with empty body and empty initializer list. That is, it calls the default constructors of the bases and of the non-static members of this class.
i is non-static, but a POD type -> no constructor, no default initialization. D has a constructor, which initializes s and calls the implicitly-declared default constructor in B, but this still does nothing for i, since B's default constructor is trivial:
Trivial default constructor
The default constructor for class T is trivial (i.e. performs no action) if all of the following is true:
- The constructor is not user-provided (i.e., is implicitly-defined or defaulted)
- T has no virtual member functions
- T has no virtual base classes
T has no non-static members with brace-or-equal initializers. (since C++11)
- Every direct base of T has a trivial default constructor
- Every non-static member of class type has a trivial default constructor
A trivial default constructor is a constructor that performs no action. Objects with trivial default constructors can be created by using reinterpret_cast on any suitably aligned storage, e.g. on memory allocated with std::malloc. All data types compatible with the C language (POD types) are trivially default-constructible.
i is in B as uninitalized as it is in D. No difference.
You did see, that I corrected my answer? Yes, I answered a bit too quickly. But for me the whole problem is irrelevant. From my earliest contacts with computer languages, it was BASIC in the early 80th, I have been taught: You initialize your variables. And this is exactly what I am doing. I have yet to see a problem where the few cycles for a possibly unneeded initialization make a difference. So this initialization problem is nothing I have constantly in my mind, And constructors wrong? You neither defined any of the four possible constructors, nor the destructor... and this means you get the defaults. And this has nothing to do with 'when needed', only with 'did I provide one myself, so the others are compiler generated or not?'.
And initialization of non-static member variables depend on compilation unit? Again, IMHO irrelevant, but please, show me the paragraf in the C++ standard. Please do, I am really interested. AFAIK only static or global variable build-in types get a default initialization. And I don't care for globals. Not only that I don't use them, I have not even seen them used in other ppls code in years.
I still have the nagging feeling, that somehow you mean the 'static initialization order fiasco', which can also happen with globals, and where the translation unit matters... only that this has nothing to do with the code you posted.
But yes, there can be initialization problems in C++, which are relevant and which really can be important.. and I admit, I also don't have constantly in my mind, because it is a rare problem: When deeper hierarchies of multi inheritance (virtual and not virtual) are used. But so what? I know the problem and if needed I look into the specs for a fresh up.
Do you really want to tell me that no other language has less used features, or pitfalls, which are simply irrelevant when good coding styles are used?
Little correction... the i are not initialized at all... This happens only if i is static.... thought this changed with C++11.
Who cares what b.i and d.i are? They are private and in your example inaccessible anyways. If you ignore that than b.i and d.i are both 0. Thats the default initialisation for build-in types when no user defined constructor is available...as in your example. Furthermore class B has no virtual destructor -> You don't inherit from it. It is irrelevant whether B and D are in different compile units or not.
"a constructor for a class is auto generated by the compiler when needed"
What constructor? I know four.
After all is said and done, a hell of a lot more is said than done.