5 ms·
This feels like a rant about a language handing bad developers enough rope to hang an entire village. I'm unconvinced this represents a failing of the language.
by knieveltech 10y ago
This feels like a rant about a language handing bad developers enough rope to hang an entire village. I'm unconvinced this represents a failing of the language.
- thesmallestcat 10y agoI thought it was C++ that gave you enough to hang the village. I'm not sure who said it, but it's one of my favorite PL-related quotes: If C gives you enough rope to hang yourself, C++ gives you enough rope to bind and gag your neighborhood, rig the sails on a small ship, and still have enough rope left over to hang yourself from the yardarm.
- kazinator 10y agoC++ refused to give you the rope; they left it in the SGI template library: https://www.sgi.com/tech/stl/Rope.html https://www.sgi.com/tech/stl/Rope.html
- empath75 10y agoIt might not be a failing of the language, but it might be a reason not to use it all the same.
- knieveltech 10y ago"Use the right tool for the job at hand." and "A poor craftsman blames his tools." are axioms in every industry and craft.
- tdb7893 10y agoI think in software engineering it's prudent to just assume that all developers make mistakes sometimes. Anything that can have developers make less mistakes or can catch developer mistakes saves time (and therefore money) in the long term so I think it's fair to complain that c makes mistakes easy and difficult to catch.
- Baeocystin 10y agoComplaining about C in this manner strikes me as complaining that the knife you're using is too sharp, and you don't have time to make sure you won't cut yourself. Don't get me wrong. I prefer working in Python or its ilk, because I prefer a higher level of safeguards. But nothing I work on needs the precision of behavior that C provides. And sometimes you need sharp and precise.
- dbaupp 10y agoC is not precise, not as a model of modern CPUs (they're very different to the PDP-11, and compiler optimisers are very invasive) nor as a precision engineering tool (too many silent footguns and landmines adding a pile of incidental complexity). It's definitely true that it's sharp and sometimes (currently) the best tool for the job, but don't ignore the reality of its design and limitations when praising it.
- ori_b 10y agoI'm not sure where this meme that C is a direct translation to PDP-11 assembly came from. It's true that there were some quirks in K&R C that came from it (eg, the way that floats were widened to doubles when being passed to functions), but those largely went away with ANSI C. Other than that, C isn't a significantly better match for PDP-11 than it is for x86 or alpha or sparc.
- kbenson 10y agoC is like swinging a very sharp Katana to make small precise incisions. You need to stand far back to have any home of success, and you need to be very precise. With practice, your cuts may be be very precise, but it takes a lot of skill and effort. Until that point (some occasionally thereafter), a lot of accidents happen...
- csours 10y agoWith a knife, you know where the sharp bit is. With C, sometimes the handle explodes, killing everyone in the kitchen.
- aidenn0 10y agoIt's a demonstration that function-like-macros are not actually all that function-like, no matter how defensively the writer of said macros tries to be.