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

  • 0 posts edited
  • 0 helpful flags
  • 2 votes cast
Nov
10
comment Should I teach my students alloca?
How widely used is alloca in the real world? I have seen it used once in 35 years. Should I teach my students to use alloca when it makes sense? No. It plays Russian Roulette with your program's execution. Or should I teach them never to use it? Don't teach it at all, except perhaps in PhD-level CompSci courses. It's like giving a grenade to a carpenter monkey. Works fine for pounding in nails, until it doesn't; and you can never tell why after the fact. I come from a C++ background, and am teaching objects in C: Sigh. Stick with C++, that's why it was invented. structs are OK but.
Nov
10
awarded  Supporter