News for hackers. Stuff that matters.
Re:45 years since its creation. The C language still very po... by elliotec on Tuesday May 24, 2016 @02:03PM (#11763996)
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.

Re:45 years since its creation. The C language still very po... by mwfunk on Tuesday May 24, 2016 @02:28PM (#11764238)
Ironically 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 :) )

Re:45 years since its creation. The C language still very po... by derekp7 on Tuesday May 24, 2016 @02:33PM (#11764283)
Just 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).
Re:45 years since its creation. The C language still very po... by elliotec on Tuesday May 24, 2016 @03:21PM (#11764701)
> 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.
Re:45 years since its creation. The C language still very po... by asynchronous13 on Tuesday May 24, 2016 @06:16PM (#11765982)
I'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).

Re:45 years since its creation. The C language still very po... by elliotec on Wednesday May 25, 2016 @01:11AM (#11767781)
oops. 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.
Re:45 years since its creation. The C language still very po... by nibs on Tuesday May 24, 2016 @02:40PM (#11764350)
As someone who learned JS and then is recently working on C, variables.
Re:45 years since its creation. The C language still very po... by ufo on Tuesday May 24, 2016 @03:05PM (#11764570)
How? 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")
Re:45 years since its creation. The C language still very po... by elliotec on Tuesday May 24, 2016 @03:22PM (#11764715)
If the person learned ES5 and was used to the tricky scoping and had got to C before ES6 became standard/popular, I could totally see the struggle there.
Re:45 years since its creation. The C language still very po... by nibs on Wednesday May 25, 2016 @08:38AM (#11769313)
This is exactly what happened to me.