3 ms·
> An experienced Javascript programmer should have no trouble reading and understanding the general idea of C code. Sigh, how I wish that were generally true.
by glitchc 6y ago
> An experienced Javascript programmer should have no trouble reading and understanding the general idea of C code.
Sigh, how I wish that were generally true.
- umvi 6y agoDoes JavaScript even have a concept of stack vs heap? Seems like someone who has only used pure JS would be missing a lot of fundamental knowledge on how C works.
- throwaway_pdp09 6y agoNot really AFAIK. it's GC'd so you do as you please and it sorts it out.
- tyingq 6y agoFor the narrow purpose of the change the author made, his statement fits. if (this || that) {dosomething();} Is mostly identical in JS and C.
- Kagerjay 6y agoJavascript sort of does Stack - the event loop uses this for handling callback executions Heap - memory addresses for objects. For instance if you copy over an array of objects, you are copying the pointers to those memory addresses inside the array. Also memory leaks to some extent with eventListeners especially when you use a framework like React