Live data from Hacker News

I stopped everything and started writing C again

kmx.io

41–50 of 475 posts

Re: I stopped everything and started writing C again

#41
post #32

Earlier quoted context omitted.

Rust is not free of trade offs and you're not helping the cause the way you think you are. Just a few off the top: - Rust is a much more complex language than C - Rust has a much, much slower compiler than pretty much any language out there - Rust takes most people far longer to "feel" productive - Rust applications are sometimes (often?) slower than comparable C applications - Rust applications are sometimes (often?…

> Rust is a much more complex language than C Feature wise, yes. C forces you to keep a lot of irreducible complexity in your head. > Rust has a much, much slower compiler than pretty much any language out there True. But it doesn't matter much in my opinion. A decent PC should be able to grind any Rust project in few seconds. > Rust applications are sometimes Sometimes is a weasel word. C is sometimes slower than Ja…

Real projects get into the millions of lines of code, Rust will not scale to compile that quickly.

Re: I stopped everything and started writing C again

#42

Despite what some people religiously think about programming languages, imo C was so successful because it is practical. Yes it is unsafe and you can do absurd things. But it also doesn't get in the way of just doing what you want to do.

Sounds a bit like perl but at a lower level ?

You can certainly do entirely absurd things in Perl. But it is a lot easier / safer work with. You get / can get a wealth of information when you the wrong thing in Perl.

With C segmentation fault is not always easy to pinpoint.

However the tooling for C, with sone if the IDEs out there you can set breakpoints/ walk through the code in a debugger, spot more errors during compile time.

There is a debugger included with Perk but after trying to use it a few times I have given up on it.

Give me C and Visual Studio when I need debugging.

On the positive side, shooting yourself in the foot with C is a common occurrence.

I have never had a segmentation fault in Perl. Nor have I had any problems managing the memory, the garbage collector appears to work well. (at least for my needs)

Re: I stopped everything and started writing C again

#43
post #36
post #8

I started programming with C a long time ago, and even now, every few months, I dream of going back to those roots. It was so simple. You wrote code, you knew roughly which instructions it translated to, and there you went! Then I try actually going through the motions of writing a production-grade application in C and I realise why I left it behind all those years ago. There's just so much stuff one has to do on one…

Don't forget Pascal is still alive.

From what I remember about Ada, it is basically Pascal for rockets.

Re: I stopped everything and started writing C again

#47
post #11

I fully understand that sentiment. For several years now, I have also felt the strong urge to develop something in pure C. My main language is C++, but I have noticed over and over again that I really enjoy using the old C libraries - the interfaces are just so simple and basic, there is no fluff. When I develop methods in pure C, I always enjoy that I can concentrate 100% on algorithmic aspects instead of architectu…

Try doing C with a garbage collector ... it's very liberating. Do `#include ` then just use `GC_malloc()` instead of `malloc()` and never free. And add `-lgc` to linking. It's already there on most systems these days, lots of things use it. You can add some efficiency by `GC_free()` in cases where you're really really sure, but it's entirely optional, and adds a lot of danger. Using `GC_malloc_atomic()` also adds eff…

Which GC is that you’re using in these examples?

Re: I stopped everything and started writing C again

#48
post #4

[flagged]

Rust is not free of trade offs and you're not helping the cause the way you think you are. Just a few off the top: - Rust is a much more complex language than C - Rust has a much, much slower compiler than pretty much any language out there - Rust takes most people far longer to "feel" productive - Rust applications are sometimes (often?) slower than comparable C applications - Rust applications are sometimes (often?…

Not to mention, modern CPUs have essentially been designed to make C code run as fast as possible.

Re: I stopped everything and started writing C again

#49

Earlier quoted context omitted.

Rust is not free of trade offs and you're not helping the cause the way you think you are. Just a few off the top: - Rust is a much more complex language than C - Rust has a much, much slower compiler than pretty much any language out there - Rust takes most people far longer to "feel" productive - Rust applications are sometimes (often?) slower than comparable C applications - Rust applications are sometimes (often?…

> helping the cause Rust evangelism is probably the worst part of Rust. Shallow comments stating Rust’s superiority read to me like somebody who wants to tell me about Jesus.

Jesus wasn't written in Rust? Sounds like a recipe for UB if you ask me.
Post reply on HN