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

  • 0 posts edited
  • 0 helpful flags
  • 4 votes cast
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?