Reputation
Top tag
Next privilege 125 Rep.
Vote down
Badges
2
Newest
 Teacher
Impact
0 people reached

  • 0 posts edited
  • 0 helpful flags
  • 4 votes cast
Jul
21
comment Should I initialize C structs via parameter, or by return value?
Downvoter, care to explain? Is something I said factually incorrect?
Jul
21
awarded  Teacher
Jul
21
answered Should I initialize C structs via parameter, or by return value?
Jul
21
comment Should I initialize C structs via parameter, or by return value?
How would the first approach lead to a "half-initialized" Foo struct? The first approach also performs all initialization in one place. (Or are you considering an uninitialized Foo struct to be "half-initialized"?)
Jan
28
comment Why do python generators and functions share the “def” keyword?
In general, language designers usually try to avoid adding unnecessary keywords. Every keyword they add is an identifier that programs aren't allowed to use for other purposes.
Jan
28
comment Why do python generators and functions share the “def” keyword?
@StevenBurnap Derek's suggestion of using something like gen instead of def wouldn't make that transformation significantly more onerous.
Aug
23
comment Why does void in C mean not void?
Regarding why they reused void: an obvious reason would be to avoid introducing a new keyword (and potentially breaking existing programs). Had they introduced a special keyword (e.g. unknown), then void* would be a meaningless (and possibly illegal) construct, and unknown would be legal only in the form of unknown*.
Feb
26
awarded  Supporter
May
14
answered Best permissive license for a utility library?