|
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 17hrs 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 called ?
I have never seen usage of term "embedded variable "...
modified 8hrs ago.
|
|
|
|
|
yes and I will do it again I tells you!
Enum class part of another, or groups of classes that linked, mainly object model and not really any functions/methods inside.
My mind views it like the document plan, its one piece of paper the defines the object, so why would I want to have multiple pieces of paper, individually they are useless
|
|
|
|
|
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
|
|
|
|
|
The famous Russel's Paradox, from what i remember.
|
|
|
|
|
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.
|
|
|
|
|
jschell wrote: parallel lines do not intersect
Though I am not a theoretical physicist, have heard that "space is curved", whatever it means. If space is curved, will there be a possibility of parallel lines meeting? Not sure.
|
|
|
|
|
The exception for statement 1 is no exception. Doh
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
You :
does a solution to the Russel Paradox exist
ChatGPT
Yes, several solutions to the Russell Paradox exist, which emerged after Bertrand Russell presented the paradox in 1901. One common solution is to restrict the comprehension principle, which states that for any property, there exists a set of all objects that have that property. By restricting this principle, mathematicians and logicians have been able to formulate set theories, like Zermelo-Fraenkel set theory (ZF) or von Neumann-Bernays-Gödel set theory (NBG), which avoid the paradox by disallowing the formation of certain "self-referential" sets. Another approach is to distinguish between sets and classes, where classes can contain sets but not be sets themselves, thereby sidestepping the contradiction. These solutions have allowed set theory to develop into a foundational framework for mathematics without succumbing to paradoxes like Russell's.
Me : If Statement 2 is a rule it must have an exception.
Conclusions: Statement 1 has no exception. There is at least one rule which has no exception.
|
|
|
|
|
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
|
|
|
|