say that with C language global variables are forbidden throughout all the course, stating that from a pure "good programming practices", global variables are not something to be used. So I was wondering, what do you think about that? Why would you not adoperate global variables in certain C programming contexts or elsewhere?
Variables are evil!
the problem with c is it's not much optimizable by compiler, you need to care about everything manualy. some global stuffs ruines stack layout, it can create fragmentations, cache missing, etc if not properly be used. just use if is not avoidable
Обсуждают сегодня