Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In C, you learn to modify a letter to upper or lower case, by finding its ascii number, and adding to it, or subtracting from it, a magic number.

In Python, you just use the .lower() or .upper() function.

One and done. Move onto your next problem.

In C, you hope to not trigger an array-index-out-of-bounds error, resulting in a segmentation fault. Then, not understanding what you did wrong, and then having to fire up the debugger to find your needle in the haystack.

Hours later, you’re just like, I just want to modify a string. Why is it so difficult?



This is a silly argument. You have to do the exact same thing in python if you don't want to use a standard method/function. There's nothing stopping you from using a standard function in c either.

Your rant should be about bad teaching of bad habits instead


What I’m trying to point out, is that C has a lot of compromised and poor design decisions made, as a programming language.

Maybe it was because it was designed in the 1970s, when computers were more primitive. But better alternative languages were designed back then that didn’t have the failings of C.

But these designs permeates throughout the language. So eventually errors keep coming up.




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

Search: