News for hackers. Stuff that matters.
Re:Tell HN: C Experts Panel – Ask us anything about C by orsenthil on Tuesday April 14, 2020 @10:00AM (#22866055)
Why is still the learning curve for C so high?

* Why can't the learning curve be solved using tools? * Why don't we actively promote more higher level languages which are implemented in C (by fewer people)?

Re:Tell HN: C Experts Panel – Ask us anything about C by NickDunn on Tuesday April 14, 2020 @10:12AM (#22866187)
I think that C provides fewer layers of abstraction than other languages. This requires the programmer to deal with memory management, treat strings as an array of characters, and other things that the majority of high-level languages conceptualise, so that the human mind deals with it more easily. This provides advantages and disadvantages, as it requires more thought and understanding to write the code but also allows the use of low-level features. The lack of tools to solve any learning issues is probably down to the programmer needing the right conceptual understanding and the requirements placed on anyone using the various features of the language.
Re:Tell HN: C Experts Panel – Ask us anything about C by pantalaimon on Tuesday April 14, 2020 @10:08AM (#22866153)
Do you find the learning curve for C to be high? I find it quite the opposite. It's a simple language with only a few concepts to learn, once you got those, that's it. There might be some preprocessor tricks you'll pick up later, but the base language and library is pretty comprehensive IMHO.
Re:Tell HN: C Experts Panel – Ask us anything about C by throw_m239339 on Tuesday April 14, 2020 @10:50AM (#22866693)
> It's a simple language with only a few concepts to learn

I mean by that logic, Assembly could be deem even simpler, yet writing OR reading programs in Assembly is absolutely not simple at all.

At the end of day, one has to write programs that solve (complicated) problems, and learning how to do that in C is difficult, thus the learning curve deemed higher when it comes to writing professional C.

I can guarantee you that writing professional Go or Java and writing correct programs in both takes way less effort than with C, for use cases that would make Go or Java viable.

Re:Tell HN: C Experts Panel – Ask us anything about C by quelsolaar on Tuesday April 14, 2020 @04:32PM (#22871093)
Modern assembly language has a huge set of instructions, that make them hard to learn, but the concept is still easy to learn.
Re:Tell HN: C Experts Panel – Ask us anything about C by DougGwyn on Tuesday April 14, 2020 @05:24PM (#22871641)
Many antique computers are simulated by SIMH. If you have the corresponding software, you can operate on your desktop a simulated computer's software development system. For example, DEC VAX (VMS or Unix) has a relatively simple and sane assembly language.
Re:Tell HN: C Experts Panel – Ask us anything about C by quelsolaar on Tuesday April 14, 2020 @05:45PM (#22871868)
I think, learning a tiny bit of assembler, even if in an emulator, is very valuable to teach the basics.
Re:Tell HN: C Experts Panel – Ask us anything about C by orsenthil on Tuesday April 14, 2020 @10:20AM (#22866298)
C is indeed a very small language. But the expressive power of C for real-world problems brings a huge learning curve in terms of organization, tracking, and understanding.
Re:Tell HN: C Experts Panel – Ask us anything about C by darepublic on Tuesday April 14, 2020 @10:24AM (#22866335)
Coming from python/js I found it to be high. Mostly because of the memory management/ making sure I call free correctly etc. In many cases where I would plow ahead in programming, with C I had to stop and would feel dread. A lifesaver for me was using C/C++ Repl environments where I could quickly prototype or sanity check things I was doing.
Re:Tell HN: C Experts Panel – Ask us anything about C by pantalaimon on Tuesday April 14, 2020 @10:49AM (#22866675)
The trick is to just not use `malloc()` and `free()` unless absolutely necessary ;)
Re:Tell HN: C Experts Panel – Ask us anything about C by throw_m239339 on Tuesday April 14, 2020 @10:52AM (#22866721)
> The trick is to just not use `malloc()` and `free()` unless absolutely necessary ;)

The problem is that often C programmers have to deal with API and libraries they didn't write themselves to solve their problems, thus are forced to use constructors and destructors even when they don't want to.

Re:Tell HN: C Experts Panel – Ask us anything about C by Tronic2 on Tuesday April 14, 2020 @10:36AM (#22866505)
Syntax of pointers. Easy to use high level languages make extensive use of pointers (i.e. all their variables are actually pointers) but beginners cope with them because no stars or ampersands are required, with the help of GC. Of course they'll get bitten soon and often because it is too easy to create copies of pointers rather than copies of full data structures, and without understanding pointers it's hard to grasp why that happens.
Re:Tell HN: C Experts Panel – Ask us anything about C by bumblebritches5 on Tuesday April 14, 2020 @04:22PM (#22870984)
I taught myself C from just reading code and trying to contribute to a few projects right out of high school, no books, no school.

So I don't think C has a very high learning curve, C++ on the other hand...