Hacker News new | ask | show | jobs
by jrockway 5991 days ago
Heh. I'm not even sure what that was going to be :)

But really, a lot of those projects have actual code in them... and some even have users. :)

As such, I think it's unfair to dismiss anything I say with "shut up and write some code", because I code and talk about coding.

1 comments

He wasn't asking you to write code. If you read it, he is asking about writing code that is better, or more specifically, products that are better. A list of projects you've worked on is mostly irrelevant in the face of that accusation.
His "challenge" is too ridiculous to even reply to. Of course software that has had millions of users (and hundreds of contributers) over 30 years is going to be better than what some language advocate is going to be able to crank out in a week or month or year. Put enough time and polish into something, and it's going to be good regardless of what language you choose.

It would be a waste of time to rewrite some well-established project to prove some point about a language. ("Hey, I spent a year of my free time to make a $foo that's not as good as the $foo that already exists! Yeah!!!") It's much better to incrementally move away from the legacy code, to make future incremental improvements. (Firefox is a good example; more and more of the code is safe Javascript instead of raw C++. That's because it's easier to write/test/enhance, and because modern computers and virtual machines make the overhead acceptable.)

There is, of course, a surprising amount of non-C code out there. Firefox is Javascript. Emacs is Lisp. SBCL is Lisp. GHC is Haskell. Xmonad is Haskell. Debian's packaging system is Perl. The websites you use daily are Perl/Python/Ruby/PHP. And so on. Of the software packages that I use on a daily basis, very few are pure C. (xmms2 is. That's all.)

C exists in production software, but that's because it was the only option when these programs were being developed.

Take a snapshot of new ideas and projects being started right now, and see if C is still the most popular. That is a more reliable indicator of the state of the art.

You're straw-manning. I didn't say that C was the best language for everything, nor did I even say it was better than Haskell.

I was responding specifically to your claim that Haskell was better than C for the tasks that C is good at. And I asked for one example of a non-trivial core library (again, not a framework: something like crypto, graphics, numerics, yada yada -- things that are hard, not toys) that would prove that. And there are none.

Obviously I think that says something about the wonderful advantages you think Haskell has.

It has a great FFI layer, so you can just call all that code that already exists and get on with building something new.

That's what it says.

> Put enough time and polish into something, and it's going to be good regardless of what language you choose.

I don't think the evidence supports that claim. Witness the select() API or any number of other issues in the modern libc which have gone unaddressed for so many years. Then look at how libraries are occasionally rewritten better in a matter of months. It should be possible to develop software in new languages that compels the user compared to what they already have access to, else why develop a new language?

When you say millions of users, I think I'm not communicating well. When I say "products," I mean products where the programming language is actually relevant: libraries and frameworks. You don't need millions of users to be considered a huge success in that market.

So I guess my continued question is, have you written any libraries that got serious traction because they were much better than an alternative written in C? Because if you read him charitably, that's what the comment we're discussing was really asking for. You replied with a laundry list of projects and nothing actually relevant.

> more and more of the code is safe Javascript instead of raw C++

I'd be interested to see the extent to which this is actually true. Do you have a plot of the linguistic composition of the program over the years? Or at least some links to news articles to back up your claim?

> Of the software packages that I use on a daily basis, very few are pure C. (xmms2 is. That's all.)

I take it you don't use an operating system? Or do you mean to say that by including a little bit of non-C code, something significant has changed in the overall composition of the software you use?

> and see if C is still the most popular. That is a more reliable indicator of the state of the art.

I disagree that language popularity in new projects is a reliable indicator of anything except what language is popular at a given time.

@jrockway

GHC is not just Haskell. The runtime is written in C and C--.

C has its place. Anything close to the machine metal and bootstrapping code could and should be written in C. Don't confuse "all programs" with "all programs I like to write."