|
In C++. you can use pimpl if you want to hide something in the implementation.
or even have a class in the implementation file (cpp) if it's only used in that translation unit.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
I do, but the embedded classes are always marked private - they are only accessible within the containing class.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
yeah, no private at all listed...
it doesn't help that VS2022 has some of the most ridiculous compiler errors. One error typically generates N other gripes.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
I've done this too (minus marking it as private), but only when the inner class needed access to some private members of the container class, and the internals of the inner class was nobody else's business - including the container.
Something like that anyway. I've rarely done it, but I have.
|
|
|
|
|
Every time I've embedded classes inside another class, some new requirement down the road requires I remove this embedded class and make it stand on its own.
I will occasionally put two classes in a file, especially when one is the <type t=""> for a custom collection class. The collection class is usually very short (<40 lines) and I put it at the top of the file so both classes are visible on the first screen in the IDE.
modified 7hrs 20mins ago.
|
|
|
|
|
happy to see it's not just me.
The only two times I have seen this style, they both came from CS grads whiz kids. I'm now going through a lot of code from WK#1 where he forgot to initialize a bunch of variables.
Side note: I know VS2022 allows you to ignore uninitialized variables, but why in God's good name would you ever turn that off? Been burned to many times by everything working in debug and phantom failures in release.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
As a somewhat handicapped non- queen's English speaker I get puzzled by some expression.
I have done some embedded processor hobby type projects, and currently I am struggling with child classes as members of a parent class.
I do see the differences , but mixing up these terms , or inventing new one (?) is frustrating.
Does it really makes much difference not calling classes as "member of "
as are other member variables are called ?
I have never seen usage of term "embedded variable "...
|
|
|
|
|
Statement 1: Every rule has an exception.
Statement 2: Statement 1 is a rule. Therefore Statement 1 has an exception.
Conclusion: There is at least one rule which has no exception.
Would you agree with this conclusion? If so, is there any example of a rule having no exception?
|
|
|
|
|
Friends don't let friends program in Basic.
If you can't find time to do it right the first time, how are you going to find time to do it again?
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
Kurt Gödel proved a version of Statement 1:
In any formal language, there are questions that can be asked but not answered.
A perfect example of Gödel's incompleteness law can be found in math:
- Positive Integers (lengths) can subtract a larger number from a smaller number. The answer is a negative integer, leading to:
- All integers can divide and result in a fraction, leading to:
- Fractions can be used in geometry to result in real numbers, leading to:
- Real Numbers can have square roots that are imaginary, leading to:
- Complex numbers, etc...
|
|
|
|
|
|
In a certain village, a barber shaves all those who do not shave themselves. Who shaves the barber?
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown
|
|
|
|
|
Behind every paradox lies a Cretan.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
A rule having no exception: "death and taxes"
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I once discussed that with my religious brother-in-law. He insisted that there are exceptions to that rule. May not to the "taxes" part, though.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
Amarnath S wrote: Would you agree with this conclusion? If so, is there any example of a rule having no exception?
Agreeing that a proof is valid is not the same as stating that it must be true. Now claiming that it is true could suggest that one should provide the example. Or provide other discussions that would suggest it is true. Or just believe and dispense with the work.
My favorite example with this is geometry (Euclidean) where parallel lines do not intersect. I certainly believe it. And I doubt anyone can provide an example that shows they do intersect. But for that matter they cannot provide an example where they do not intersect either.
|
|
|
|
|
Wordle 1,045 2/6
⬛⬛⬛⬛🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,045 4/6
⬜🟨🟩⬜⬜
🟨🟩🟩🟨⬜
🟩🟩🟩🟨⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,045 3/6
⬜⬜🟩🟨⬜
⬜🟩🟩⬜🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,045 4/6
🟨⬜⬜⬜⬜
⬜⬜⬜🟨🟨
⬜⬜🟩🟨🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,045 3/6
⬛⬛🟩🟨🟩
⬛🟩🟩⬛🟩
🟩🟩🟩🟩🟩
Jeremy Falcon
|
|
|
|
|
Wordle 1,045 3/6*
🟨🟩⬜⬜⬜
🟨🟩🟩⬜⬜
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 1,045 4/6*
⬜⬜🟩🟨⬜
🟨🟩🟩⬜⬜
⬜🟩🟩🟨⬜
🟩🟩🟩🟩🟩
Happiness will never come to those who fail to appreciate what they already have. -Anon
And those who were seen dancing were thought to be insane by those who could not hear the music. -Frederick Nietzsche
|
|
|
|
|
🟩🟩🟩⬜⬜
🟩🟩🟩⬜⬜
🟩🟩🟩🟩🟩
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 1,045 4/6
🟨⬛⬛⬛⬛
⬛🟩🟩⬛🟩
⬛🟩🟩⬛🟩
🟩🟩🟩🟩🟩
Ok, I have had my coffee, so you can all come out now!
|
|
|
|