Hacker News new | past | comments | ask | show | jobs | submit login
Why I Like Programming in C [video] (youtube.com)
15 points by AlexeyBrin 10 months ago | hide | past | favorite | 12 comments



Plato was walking by Diogenes the Cynic and saw him with GDB up on his screen, figuring out a memory error.

"If you would only learn to code in Rust, you wouldn't have to fix those bugs." To which Diogenes replied: "If you would only fix those bugs, you wouldn't need to learn to code in Rust."


Sounds like someone has just discovered pointers and thinks C is the only language that lets you use them.

By modern standards C is not a very good language.

Also the classic conflation of "not many features" with "simple".


It wasn't even in 1970's, if it wasn't being available for free with a full OS.

At least WG14 is finally discussing a possible proper string type, sds style.


C is enjoyable to write with although if others rely on your code, safety should have a higher priority.

The one thing I could never enjoy in C after getting used to languages like php and python is string handling. It isn't just dangerous but very tedious, complex and lacking elegance. Lack of a native string type and string operators really sucks.

I like being able to do "hello "+"world".

Another pro the author didn't mention is how my crapy code from 10yrs ago still works today. Can't say that about rust, go, python or most modern languages. It really sucks how "planned obsolecence" has crept it's way into programming languages.


> "planned obsolescence"

Cut me a break. In Go and Rust it's still easy to compile old code, and these languages have very strong backwards compatibility guarantees. You might need to compile it with a flag enabled, but it is going to compile and work.

Having the ability to improve on past language design mistakes over the years by deprecating old ways in favor of new ones is nice, and the burden of migration is generally minimal (or can be done automatically).


Go and Rust don't have old code. Talk in 30 years.


Sure, I agree that these guarantees still have to stand the test of time. So far they're holding up quite well.


If they stuck to binary libraries that would have been nice but since you have to build deps locally and match up the right versions, go and rust programs have been a constant headache for me similar to python. The version from debian repos never seems to be good enough, I have to install it from upstream and maintain it.


Not if you use any libraries. The whole venv/pyenv/pipx stuff of python needs to implemented for other languages too. Every program needing it's own virtual environment and tooling for every build.


10 years ago was 2014. What python code are you talking about? Deprecated, sure, and some things have been taken out of the standard distribution because nobody would maintain it(or there were reasons to not maintain it.) 2->3 conversion was 16 years ago.


While I still do run into 2.7 code, even for 3 dependencies are the problem. You always use a library of some kind and that library could use a new python feature. You could pin it but then other scripts that need the new version break. And that is if you could even easily find the module and version. Just this week I helped someone troubleshoot a bug they've been trying to fix for weeks/months and it was just a matter of the library code being too new for 3.6. It's an ever growing planned mess.





Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: