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

Thank you for taking the time to explain this, I've seen numerous threads where people complain about C but lack enough understanding of it to know where to properly attribute the blame. C shares one common trait with assembly: the ability to access, interpret, and modify memory freely. It is also an intensely manual language and expects the programmer to be both discriminating and thorough when dealing with unexpected values. Beyond that, they should not be compared. The language is not forgiving and as such has earned resentment from programmers which have had the benefit of using other languages that lessen the burden on the developer. Truthfully, all programming languages have an area where they excel (even ones we don't enjoy) and often times the approach or requirements of a project determine the language which should used. Many complain about it generally as being inadequate but fail to provide the context of which the language is employed, in which case it would be obvious that they should use another language. I would also like to add that scale (as in LoC or project complexity) is an important factor to consider when selecting an appropriate language. C can be much easier to manage for smaller executables/libraries or projects that don't have many layers of abstraction. Simultaneously, modern software and application complexity has grown significantly since C's inception and it is not commonly the most ideal solution. Discussions involving languages are enjoyable here when there is deliberation but I loathe when they devolve into tribalistic posturing and whinging.


> C shares one common trait with assembly: the ability to access, interpret, and modify memory freely

In reality that is a trap; C makes you think that you might be able to poke memory in all sorts of ways but in reality there are lot of subtle restrictions around memory access. The whole discussion around pointer provence is the tip of the iceberg here.

And that is pretty much at the core of the whole ub hullabaloo; difference between what C seems to be (or have been) and what the standard says.




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

Search: