Reputation
521
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
1 7 19
Impact
~136k people reached

Nov
19
awarded  Good Question
Sep
26
comment Why are the sizes of programs so large?
@skan Adobe Acrobat comes with Distiller, a PostScript "Printer" (PS is a turing-complete language for describing documents as opposed to PDF which isn't). That can't be small. But what do you mean bigger than many operating systems? IIRC, it's less than a gig. Photoshop, OTOH, that's a behemoth
Sep
17
awarded  Notable Question
Sep
2
comment Is initializing a char[] with a string literal bad practice?
Wouldn't it only make a copy if you attempt to modify it? I would think the compiler would be smarter than that
Aug
8
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
I was hoping someone would use an example using printf. @OP: int a = 65; printf("%c", a) will output 'A'. Why? Because the processor doesn't care. To it, all it sees are bits. Your program told the processor to store 65 (coincidentally the value of 'A' in ASCII) at a and then output a character, which is gladly does. Why? Because it doesn't care.
Aug
8
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
Mentioning undefined behavior when type pruning to someone who doesn't understand how there is no RTTI seems counter-intuitive
Apr
12
awarded  Civic Duty
Mar
18
revised What's the difference between WTFPL, CC0, and public domain?
deleted 12 characters in body
Mar
1
comment Bad sign if nobody can comprehend one's code?
@Kevin oh whoops. My mistake. Seems he meant something like a short circuiting binary OR (which doesn't exist)
Feb
21
accepted Is initializing a char[] with a string literal bad practice?
Feb
15
comment How to automatically connect letters into words?
Hence why they added the hyphen. If you want some good wood, I recommend penisland.net
Feb
12
comment When is a feature considered a “First class citizen” in a programming language/platform?
@travis You can assign classes/structs/enums to variable in C# and Java. In C#, you use the typeof operator: Type foo = typeof({className}). Not sure how to do it in Java (been a while), but it involves the Class class (don't know package). If you mean creating one at runtime, I know .NET makes that possible with reflection, but I don't know how. I don't know about Java though. For you example, you'd be doing something similar to C/C++'s anonymous types. AFAIK, .NET and Java don't support that kind of anonymous types; you're better off just making another class instead.
Feb
10
awarded  Organizer
Feb
10
revised What is the difference between ref and out in runtime?
no tags in titles (sortove)
Feb
10
suggested approved edit on What is the difference between ref and out in runtime?
Feb
10
comment What is the difference between ref and out in runtime?
My guess is they both are implemented the same way as ref in C++; to pointers to the object pointer (or primitive) in question. i.e. Int32.TryParse(myStr, out myInt) (C#) is "executed" the same way as int32_tryParse(myStr, &myInt) (C) would; the only difference being some constraints enforced by the compiler to prevent bugs. (I'm not gonna post this as an answer because I may be wrong about how this works behind the scenes, but this is how I envision it works [because it makes sense])
Feb
9
awarded  Nice Question
Feb
8
comment Why is instance creation the way it is?
@CortAmmon how would you accidentally call a private method? Surely you meant internal?
Feb
8
comment Why is instance creation the way it is?
@Aaronaught is correct. Don't create separate classes for different types of people. Use a bitfield enum.
Dec
30
awarded  Excavator