3 ms·
Even looking at simple code example, with casting from/to void, returning 0 as void etc, I cannot understand how people are calling C easy and productive langua
by galkk 3y ago
Even looking at simple code example, with casting from/to void, returning 0 as void etc, I cannot understand how people are calling C easy and productive language
- vngzs 3y agoThat claim isn't made on the linked site, though. I think people who write C nowadays tend to be working in the drivers and OS development spaces.
- trealira 3y ago> I think people who write C nowadays tend to be working in the drivers and OS development spaces. I think it's also students; I think some people are still taught C as their first programming language. If you go on r/C_programming on Reddit, a lot of it is filled by very basic questions from what seem like beginners; I suspect they're students trying to do their homework.
- kristianp 3y agoPerhaps not the first language. In my experience C is often in the second batch of languages after the introductory one (java back in my day).
- 0xbadcafebee 3y agoThere's at least 4 kinds of C programmers today: - People who work on projects which require low-level access, potentially mixing in assembly code (drivers, OS, etc), porting to different architectures, real-time, high-precision, control of timing, lack of MMU, etc - People who want to perform specific actions, like a specific OS syscall, that may not be exposed [easily] by a higher level language in the way the programmer wants - People who want to write very fast/efficient code - Legacy code maintainers Not too long ago I busted out some C to create a stripped binary for a job interview round. The interviewee needed to diagnose what the binary was doing and why and report back. Not all that common for most programmers today, but I expect a good amount of detail from a senior-level systems candidate.
- salawat 3y agoYou're making bits dance through hardware with minimal overhead or layers of abstraction/other programmer's opinions to deal with. I call that productive. Further, you have the smallest API/ABI stdlib to work through the quirks of of any language. Again. Productive. I, of course, take the precaution of allocating time to blow up 5/8 of a solar system/a star into my projects. I have a tendency to find ways to do things other than intended, and like to absorb the lessons. As a result, I have quite the collection of ways not to do things, or how to do things other than I intended. Just because your management fu disagrees with my definition of productive is not my concern.
- chii 3y agoHaving your own definition of productivity means no one can argue or have a discussion about productivity with you. At least you're not getting reduced productivity from hn arguments online.
- zeroCalories 3y agoDespite all of the scary casting, there is fairly little you need to know about C to understand what's going on.
- SAI_Peregrinus 3y agoC is a small language. It's not simple, nor is it easy. Brainfuck is a tiny language. C++ is a gigantic language. Language size and ease of use are not directly related.
- codys 3y agoThe things you've described are either not required or often considered bad style in C even though they are valid C. Casting to/from `void *` isn't needed in C, and is commonly against coding conventions, like those used by the Linux kernel. One would generally return `NULL` instead of `0` as `void *`. But yes, it is possible to write some funky C code that could be technically correct but still not be considered good.