4 ms·
> Is it the manual memory management (malloc/free)? Or is it keeping aware of a variable's data type, knowing when and when not to use pointers and references?
by elliotec 10y ago
> Is it the manual memory management (malloc/free)? Or is it keeping aware of a variable's data type, knowing when and when not to use pointers and references?
Yes, both I think. These are ways of thinking that simply don't seem to apply in JS or any other dynamically typed higher level language.
Also, just sort of the conventions of naming things, like malloc or memcpy or in the example of the article, all those crazily shortened abbreviations that may just be saving bits or the developers style, but make it very unreadable for me.
I'm used to stuff like:
function getDataFromServer(){
var data = response
//blah blah etc
}
and it may just be a thing that you have to get used to with experience, but I can read and write Python, Ruby, JS, Clojure and other lisps, and have experience with C#, but something about C I just struggle with, and I wish that wasn't the case.
- asynchronous13 10y agoI'll agree that memory and type issues are more of a barrier, but the variable naming is just convention of the programmer. There is a lot of legacy code where brevity in naming was emphasized, but that was just the convention of the time, nothing inherent in the language. it doesn't need to be that way. Your example looks like completely valid C code to me (except for the lack of semi-colon).
- elliotec 10y agooops. Thanks for calling me out on the semi-colon. I also forgot to pass response as an argument. I should be ashamed of myself. Must've been late.