|
|
|
|
|
by Gibbon1
2345 days ago
|
|
Yes goto in C is perfectly safe. Far as I've been able to discern 1970's computer scientists believed they could prove things about program iff they restricted the language features. Problem is, you basically can't and goto in structured languages isn't an impediment. See also the rules against using continue and multiple returns. Personally I can't see how function pointers are worse than languages pushing return addresses onto the same fucking stack they push data. Restrict functions to a single page sounds like a home work assignment rule that's been cargo culted into a standard. Functions should do one logical thing and nothing more or LESS. The two runtime assertions might make sense for a space craft where cosmic rays are randomly flipping bits. Don't make much sense otherwise. My theory is functions that modify state should barf hard when told to do something stupid. Functions that don't should return an error. |
|