Skip to main content
15 events
when toggle format what by license comment
Jan 2, 2018 at 1:02 comment added Robert Harvey @RaphaelSchmitz: I don't know why you keep arguing with me about this. The struct keyword has a very specific meaning that you'd know clearly if you took the few minutes to research it. That meaning has very little to do with what's in the Clean Code book.
Jan 1, 2018 at 14:48 comment added R. Schmitz @Robert Harvey Why do you make me explain that somebody writing code according to Clean Code might use C# and thus has the option of using structs? You have 150k rep here and your profile says you've been a "software developer for many years" - you are well aware of this fact.
Jan 1, 2018 at 14:32 comment added R. Schmitz @DocBrown Oh I know it's possible. What I mean is, according to the guidelines. Somebody wrote those and put the point "under 16 bytes" in there. There were probably reasons for that. If I know those reasons, I know better when to pragmatically follow the guidelines and when not.
Dec 31, 2017 at 19:47 comment added Robert Harvey The struct keyword has nothing whatsoever to do with the Clean Code book. Microsoft didn't consult Uncle Bob before they put the struct keyword into the language, and there's nothing about the struct keyword that is specific to what Uncle Bob teaches.
Dec 31, 2017 at 15:31 comment added Doc Brown @RaphaelSchmitz: huh? You didn't take that 16 bytes recommendation (not more!) literally, don't you? This is a soft limit, surely you can make structs bigger than that if you like, it is just a matter of performance and resources, which for 99,9% of all real world programs won't matter. And if a struct need 15, 16 or 24 bytes does not make a big difference for most situations.
Dec 31, 2017 at 11:22 vote accept R. Schmitz
Dec 31, 2017 at 11:16 comment added R. Schmitz @Doc Brown My mistake for not mentioning I'm working in x64. However, take note that the docs say "under 16 bytes" - so according to that a struct can't even handle 2 strings .
Dec 31, 2017 at 11:16 comment added R. Schmitz @Robert Harvey Nah, I'll probably never get to that. Just trying to make sense of why structs are even there or if they have any role in Clean Code.
Dec 30, 2017 at 1:06 answer added Erik Eidt timeline score: 1
Dec 29, 2017 at 23:21 comment added Doc Brown Your Adress struct actually requires a size of 16 bytes in x64 mode, and 8 bytes in x86 mode, not more. String members are nothing but references to string objects, and references are implemented in the CLI as pointers.
Dec 29, 2017 at 23:21 review Close votes
Jan 3, 2018 at 3:02
Dec 29, 2017 at 22:56 answer added Robert Harvey timeline score: 2
Dec 29, 2017 at 22:47 answer added amon timeline score: 7
Dec 29, 2017 at 22:43 comment added Robert Harvey Are we still trying to use structs as DTO's? :P
Dec 29, 2017 at 22:31 history asked R. Schmitz CC BY-SA 3.0