6 ms·
Yeah, again and again. it's like blaming a hammer for the potential of breaking your finger when you use it, and proposing the use of a spoon, instead.
by buserror 10y ago
Yeah, again and again. it's like blaming a hammer for the potential of breaking your finger when you use it, and proposing the use of a spoon, instead.
- grabcocque 10y agoIf the handle of the hammer you're holding was a chainsaw that randomly turns on and off. And also sometimes explodes killing your entire family and pet dog. Don't blame the explodey-chainsaw-hammer, it's just a tool. Okay an idiotically dangerous too that nobody in their right mind should use, but still just a tool.
- geezerjay 10y ago> If the handle of the hammer you're holding was a chainsaw Except it isn't. It's just a hammer, with a handle of a hammer. > And also sometimes explodes killing Except it doesn't. At best, some people are reckless and end up causing problems due to their recklessness. Enough with these silly hyperboles. Cushioned environments lead to less problems.
- quickben 10y agoEh, no need to overreact that much. Look. Hardware is hardware, and this is where tire meets the road so people can lay the foundation for the upper levels. It is what it is. It's not user friendly because hardware just isn't, low levels aren't, and it has to just perform. > 'idiotically dangerous' Well, I don't want to sound harsh, but nobody forces anybody to do systems programming if they perceive C as such. There is JavaScript, python and plethora of other safe and cozy languages, but: the low level has to be done.
- grabcocque 10y agoOh, I see it's not that there's such a thing as a bad tool, or that C is unsafe. Simply most of us don't have your towering intellect to appreciate it. Got it.
- quickben 10y agoMaybe I was too harsh, I apologize. But c is far less dangerous than a kitchen knife. Tools are tools, some are used with a great amount of care: jackhammers, routers, compression hammers, chainsaws etc. Heck: driving a vehicle is probably the single most dangerous activity we do on a daily basis.
- yxhuvud 10y agoHardware is hardware, but C is not. People need to stop pretending that it is.
- nurettin 10y agoLook at all his comments in this thread. He is just fishing for an argument/attention.
- chrisd1100 10y agoC is utterly predictable. Maybe you're the exploding chainsaw in this metaphor.
- adamnemecek 10y agoHow detailed is your knowledge of undefined behavior?
- module0000 10y agoWe know when undefined behavior will occur(the specs are written very clearly), but not what will happen when it occurs. Our job as competent C programmers is to avoid undefined behavior. C isn't hard(perhaps tedious to do correctly) - it does exactly what you tell it to.
- adrianN 10y agoYou'd be hard pressed to find a non-trivial C program that doesn't contain any undefined behavior.
- sidlls 10y agoDepends on what you mean by "non-trivial," I should think.
- pcwalton 10y ago> it does exactly what you tell it to. This is a tautology. What do you expect to happen on signed overflow?
- mathw 10y agoIt does, but it's unnecessarily difficult to keep track of all the places undefined behaviour might occur and make sure you don't step into any of them under any conditions ever. We shouldn't have to work like this anymore. C's been an amazing language, but it's getting time to gently, respectfully, move on. There's active and interesting development in alternatives which attempt to retain C's primary advantages while also allowing the compiler to keep you out of trouble as much as possible. We have hugely powerful computers available to use as developers. We can contemplate designing and compiling languages with a complexity which would have completely defeated the systems available when C was developed. Why shouldn't we use some of that power to make our lives easier?
- digler999 10y ago> sometimes explodes thought you were talking about java bloatware for a second. Oh your OS doesn't have 1.2gb for HelloWorld.class? Enjoy your OutOfMemoryException!
- marcosdumay 10y agoMore like blaming a power-saw for the potential of destroying your table when you want to cut some bread. If you are in for cutting a tree, go for it.
- adamnemecek 10y agoThis C apologism is holding the industry back. Software development has changed many times over since C came out and it just isn't a good tool for tackling a lot of the issues that we have today. Just about every software project written in C has some serious bugs. I personally judge a language by how well it lets you to define abstractions. In C's case, it doesn't let you do that very well.
- quickben 10y agoYour criticism lacks constructivity. What do you propose we replace C with?
- adamnemecek 10y agoDepends on what you are writing. C isn't 100 percent replaceable right now but the more people bitch about it and support the alternatives, the better for the future.
- SeanDav 10y agoJust curious, what are us C apologists supposed to be apologizing for: - A lack of suitable replacement for C? - C is too ubiquitous? - C has been an integral part of most of the best software ever written?
- usefulcat 10y agoAgree with the first two but the last isn't saying much. C has been an integral part of most software ever written, best, worst, and everything in between.
- naasking 10y agoAda has been a suitable replacement for C since the early 90s when GNAT was released. Prior to that there were still plenty of suitable C replacements given a little work, like Pascal and Oberon.
- 10y ago
- CmdrSprinkles 10y agoWhile I am all about C/C++ (even if I hate it), it makes sense HN is probably something like 99% web and app developers (I would argue that all are the former, but my definition may be a bit old). In those cases, you actively don't want to ever use C and anyone who does is kind of an idiot. It is the logic by which "systems project" means "script to run on a server" for a lot of people around here. And that is fine. But just like this place's obsession with Rust would lead to derisive mockery by "real" systems people, so too is C hated here. It also doesn't help that universities, at least in the US, seem hellbent on teaching along these lines. A few years ago Eclipse was "the thing you use when you are poor or doing Java". These days? I am seeing disturbing numbers of graduates who refuse to use Visual Studio for a project on Windows and insist on boostrapping together something that is only half functional. And talking to my academia friends (and even doing a fair amount of guest lecturing for them), I know where the indoctrination is coming from.
- pjmlp 10y agoMy university in the mid-90's already knew it was better to teach safe practices in C++ and Pascal dialects than keep teaching pure C. We were supposed to be able to use C in the OS design classes from our C++ learnings.
- CmdrSprinkles 10y agoAnd I think that is the way to go. I am personally a fan of having more sciencey programs use matlab and more "pure" CS use python as the first languages. Save C/C++ for the lower level stuff (as in OSes and hardware interfaces and optimization). Although, I would argue that nothing beats C++ for teaching OOP and data structures My problem is the almost dogmatic indoctrination that goes along with it. My cousin's Intro to CS class was taught by a professor who spent about a third of the time basically parroting Stallman (he actually would regularly bring up blog posts and articles on the screen and read them to the class...) and screaming about how everyone needs to use either Vim or Jetbrains tools. That isn't teaching. That is pushing an agenda. And it just makes for worse students and hell for those of us who still spend some time with the interns and new hires. Always explore new and better tools. But understand why. Sous-vide is awesome and has the potential to make some of the best food you will ever eat. But it also understand that even a "worse" method can be much more efficient or effective.