5 ms·
C is nearly inaccessible to me. It really is like the Latin of programming languages, insofar as JavaScript is the new English of programming languages which is
by elliotec 10y ago
C is nearly inaccessible to me. It really is like the Latin of programming languages, insofar as JavaScript is the new English of programming languages which is the world I have been living in for some time now.
Its like you can see the Latin roots of a lot of English, but reading it is like reading lorem ipsum. Same with C vs. JS with me.
- mwfunk 10y agoIronically it's the other way around for me. C is not just modern English but some 1000-word subset of modern English. JS feels like Esperanto or something- a synthetic language that was informed by English (and other languages) but is really its own thing, and was designed for a very specific purpose. (Those are my subjective feelings about those languages, not actual analysis of any real properties of those languages :) )
- derekp7 10y agoJust out of curiosity, which elements make C inaccessible compared to other C-like languages? The base structure is identical to the later derivatives (if/else, for, while, operators and precedence, use of curly braces). 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? Or is it the limited number / scope of functions included in the standard libraries? (I'm mainly curious, as C seems to be the most comfortable language to me since I've known it for the last 25 or so years).
- nibs 10y agoAs someone who learned JS and then is recently working on C, variables.
- ufo 10y agoHow? The only big difference is that in C the variables need type annotations and that they have proper lexical scope (so they are more like Javascript's "let" than "var")
- 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.