News for hackers. Stuff that matters.
Re:Should every programmer learn C as their first programmin... by randyrand on Thursday June 28, 2018 @06:25AM (#17415609)
C is a very simple language. much simpler than js

you can write a C compiler in just a few thousand lines.

Re:Should every programmer learn C as their first programmin... by masklinn on Thursday June 28, 2018 @06:30AM (#17415633)
C is also a terrible learning language, much harder to reach the "get things done" stage than most other languages.

You can spend weeks segfaulting in C before you get things actually working, and for a beginner — especially self-teaching/unsupervised — it's extremely easy to rely on compiler-specific behaviour in the face of UBs.

When learning, if the only choice were C or assembly I'd actually recommend assembly.

Re:Should every programmer learn C as their first programmin... by saas_co_de on Thursday June 28, 2018 @07:02AM (#17415815)
> You can spend weeks segfaulting in C before you get things actually working

This seems like an overstatement. The first programming class I ever took was "Introduction to Programming with C" where the textbook was K&R and we were writing and compiling programs from day one.

If you can't figure out how to manage memory (one dimensional data structure) in C jumping into a language that immediately allows you to abstractly manipulate complex multi-dimensional data structures will certainly not make your life easier.

Re:Should every programmer learn C as their first programmin... by scandox on Thursday June 28, 2018 @07:27AM (#17415938)
Depends on the type of thinker someone is. Everyone thinks best at a particular level. While a certain data structure might be complex, it’s use might be simple.

If I show someone a list of lists in C# the semantics of that will be very easy for them to grasp. The same data structure in C might defeat them altogether.

Re:Should every programmer learn C as their first programmin... by saas_co_de on Thursday June 28, 2018 @08:09AM (#17416178)
> The same data structure in C might defeat them altogether

I agree with this, but my point is that to get started in C all you need to work with is strings/arrays.

> While a certain data structure might be complex, it’s use might be simple

I would argue that in most cases the use only appears to be simple and in reality the correct use is just as complex as the data structure.

Re:Should every programmer learn C as their first programmin... by masklinn on Thursday June 28, 2018 @04:43PM (#17420319)
> I agree with this, but my point is that to get started in C all you need to work with is strings/arrays.

Which are both absolute shit, that's not exactly a ringing endorsement.

Re:Should every programmer learn C as their first programmin... by singularity2001 on Thursday June 28, 2018 @08:45AM (#17416376)
ok, sarcasm, got it
Re:Should every programmer learn C as their first programmin... by rurban on Thursday June 28, 2018 @06:28AM (#17415628)
C with its unsafe pointers, unsafe memory management and unsafe types is the worst language to learn for the beginning. It's good to know and learn as 2nd language, but for the beginning you need to learn proper concepts, not broken concepts.

Lisp is still the best language to learn, but any proper scripting language will do also.

PS: "proper scripting language" of course excludes PHP and JavaScript. Dart is fine.

Re:Should every programmer learn C as their first programmin... by simion314 on Thursday June 28, 2018 @07:17AM (#17415898)
C is hard to create complex programs but for learning simple things pointers are much more simple to understand then say Rust or other abstractions, a programmer will have to understand what it happens under the abstractions.

I understand the point that C is not the best choice this days to do big projects but for learning it seems a good idea, even to learn what segfaults are and buffer overflows are.

Re:Should every programmer learn C as their first programmin... by kazinator on Saturday June 30, 2018 @10:29AM (#17430972)
C for utter beginners is probably like being tossed into a tsunami for swimming lessons.

"Okay, now this is how you float on your back; but watch your head: there a protrusion of iron rebar sticking out of a broken concrete bridge support, and you're heading straight for it! We call that 'uncomfortable behavior'."