also I just realized that Brazil did NOT make a programming language entirely in Spanish and call it “Si” and that my professor was making a joke about C… god damn it
this post is probably too nieche but I feel like Lemmy is nerdy enough that enough people will get it lol
Knowing nothing about code but a fair bit about cars, does that analogy mean like, you can play around with a kit car all you want because you built it, it’s relatively simple, and if you break it you’ll know why and how to fix it, and the Mercedes being the exact opposite?
I meant that with a Caterham or other kit cars you have to think about every little nut and bolt that goes into the car. You have to make sure everything is properly tightened and tuned or else something pretty catastrophic can happen. And that’s entirely on you and your ability to do everything to spec.
Whereas with a Mercedes most of that stuff was figured out already, and if you do need to work on it it probably involves more about checking the diagnostics and taking it to the garage. You don’t need to get every bolt perfectly tightened and tune the carbonator for every build. You take some off the shelf parts and bolt it on to what’s already there.
Not a perfect analogy but that’s what I meant.
Not exactly. In C you have to do everything by hand. There’s a ton of weird, badly fitting parts and stuff that doesn’t really make sense.
With Python stuff just works. I worked as a Python developer for almost 10 years (switched to Java and Kotlin in the meantime). There have been hardly any real WTF moments over the whole time.
I use C/C++ for my hobby stuff (I do a lot of hobby microcontroller development) and there’s tons of weird gotchas that I would have never imagined (e.g. a missing return statement not getting flagged by the compiler, which it really should, but instead semi-crashing the program at runtime).
Python is slower, but as long as you have a project where performance doesn’t matter, it’s day and night. It’s like working with something that was purposely designed by someone who has somewhat of an idea what they are doing, compared to C/C++ which feels like something that just happened.
In my hobby stuff I now added a Lua interpreter for a kind-of app system, and while Lua is an incredibly bare-bones language it still runs laps around C/C++ when it comes to usability.
Maybe to make the metaphor of the dude before me more poignant: C feels like your granddad’s kit car that you inherited. C++ feels like you got the same kit car after the neighbourhood crackhead had it for a few years and bolted all sorts of weird accessories onto it and did a lot of “tuning”.
i’d say that’s mostly reasonable… not to say you can’t mess around in the guts of python, but you can mess around a lot more in c
the flip side of this is that python has a lot more guard rails: it’s simply impossible to write entire classes of sometimes very dangerous and subtle bugs in python code, while in c… go for it! that’s valid operations that you may have decided to do for performance reasons (also a reasonable argument, but if you know you’re not doing this fuckery then maybe it’s better to just let software not let you do them by accident or on purpose)
I think it’s not about using it, not the mechanics of using it. No putting together required. And you have everything you need to start driving it the moment you get the keys.
I’m not a mechanic or a programmer so I’m also curious what the meant lol