Live data from Hacker News

Two types of C programmers

utcc.utoronto.ca

11–20 of 225 posts

Re: Two types of C programmers

#12
post #2

The post is kind of confusing regarding which sort is the "first sort", because they are presented in one order in the provocative thesis, and in the other order in the following paragraphs. But: > My perception of the second sort of C programmer is that if they've moved to any more recent mainstream language, it's probably Rust. If in this context the "second sort" is the type who likes C on its own merits (rather t…

I am the first sort. I mostly like the ideas from C but don’t like the actual implementation. Which is why I’ve moved on to Zig.

The author asserting the second sort would have moved on to Rust makes sense. They are ones who are trying to get away from C ideas

Re: Two types of C programmers

#13
To be a bit pedantic, those options aren't mutually exclusive. An appealing property of C is that it's easy to target almost any device (often making it the best or only option). So it's possible to like C because you like (and need) something you can compile in lots of different places.

Re: Two types of C programmers

#15
I learnt C in college but C++ was emerging as the language of choice circa 1995 when I got into my first job.

This was before C++ was standardized and we had to make do with whatever MSVC 1.5 would do. It did not even support templates back then and even the highly polarizing STL did not exist yet -- in a cross platform way; The STL source itself was available from 1994, and if I recall right, the C++ compiler on Sun/Solaris supported templates etc., We were then a Sun/Solaris + Dell/WinNT shop then and had software running on both and therefore settled on the lowest common denominator of features supported by compilers on both platforms.

Heady days.

Given that environment, I was comfortable switching between C and C++.

Re: Two types of C programmers

#16
Some people like to workship whatever the UNIX founders have done, yet they miss that for Plan 9 and Inferno, they also decided to go with automatic memory management languages.

While Alef failed, Limbo's design with GC was considered a revisit from what was missing from Alef.

They also miss that lint was considered a must have tool for safer C code, introduced in 1979, and that Dennis actually proposed fat pointers to ISO, which weren't accepted.

https://en.wikipedia.org/wiki/Alef_(programming_language)

http://doc.cat-v.org/plan_9/2nd_edition/papers/alef/

http://doc.cat-v.org/inferno/4th_edition/limbo_language/

https://www.bell-labs.com/usr/dmr/www/chist.html

https://www.bell-labs.com/usr/dmr/www/vararray.pdf

Re: Two types of C programmers

#17

Earlier quoted context omitted.

… and those who mistake it for trinary.

10 in binary _is_ 2 in decimal. I think you've made an off-by-one error in your critique.

But it's (decimal) 3 in ternary, I think that's the point (you get a 3rd group of people if you're mistaken about the base)

Re: Two types of C programmers

#18
post #5

I'd consider myself the former: I use C because it's the only viable option for what I'm doing - but most of the time it's nothing to do with C itself, but the various extensions and builtins of GCC. It's the inline asm, the control of registers, placement of code and data, control of inlining, etc, which are missing from all of the C "replacements". The replacements assume you are building a user application on top…

Good points. I like C, I think simplicity and hardware alignment make it very useful. Simplicity wins in the end.

Re: Two types of C programmers

#19
I appreciate the sentiment, but:

- there doesn't have to be "two kinds". Trivially you can fit both "types" at once, I certainly feel that way. And if there are 100 programmers, there'd be about 237 other reasons to use a language. False dichotomy.

- a better categorization might be "there are two kinds of C programmers: those who eventually start using rust and those that don't." which is at least of course absolutely true.

- I dislike the idea that a programmer is bound to a language. He's a "C" programmer, She's a LISP person, etc. A good software engineer should use about 5-10 different languages appropriate for the purpose at hand.

Re: Two types of C programmers

#20
I'm old enough to be in both camps. After years of toodling around in a variety of BASIC languages, I took a class on C. For the first time, I went from a vague text-to-result association to a clear picture of machine and its inner workings*. I then learned C++ and Java which were both hot garbage at the time, and a variety of scripting languages.

The scripting langues are great for high productivity and mediocre performance. Shell languages are great for interacting with the operating system. Query languages are great for interacting with big data. But for years, C was the unparalleled language for getting the best performance out of CPU-intensive algorithms. I've still never found a language that erases these boundaries -- while I'm a "C programmer" I'm multilingual by necessity.

Today? C's performance is matched by C++, and more tedious to write. Zig is there on performance, but for my purposes, the language gets in the way. Rust also gets in the way, and can end up forcing reference-counting which tanks performance. I do like how Go mostly gets out of the way, but again, I cannot abide unnecessary reference counting.

* and, yes, the abstraction is a lie, but it's an incredibly useful and high-performance abstraction

Post reply on HN