Ask Lemmy
A Fediverse community for open-ended, thought provoking questions
Please don't post about US Politics. If you need to do this, try [email protected]
Rules: (interactive)
1) Be nice and; have fun
Doxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them
2) All posts must end with a '?'
This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?
3) No spam
Please do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.
4) NSFW is okay, within reason
Just remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either [email protected] or [email protected].
NSFW comments should be restricted to posts tagged [NSFW].
5) This is not a support community.
It is not a place for 'how do I?', type questions.
If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email [email protected]. For other questions check our partnered communities list, or use the search function.
Reminder: The terms of service apply here too.
Partnered Communities:
Logo design credit goes to: tubbadu
view the rest of the comments
Some languages are much more difficult to write reliable and stable code in, especially for larger codebases. Python is one of those. I’m not saying it can’t be done, but that’s despite the language being used, not thanks to it.
My home runs on OpenHAB, which is written in Java and built on top of OSGi.
When I set up my home automation (which was years ago) I looked into the technical aspects of the different options and OpenHAB had by far the most solid architecture.
Language makes a lot of difference in my experience. For example: a good type system can eliminate entire classes of mistakes. In Swift for example there are optional types, Non-optional types can never be
nil
and for optional types you have to explicitly deal with the possibility of a variable beingnil
. Boom, null-pointer error are a thing of the past, enforced by the compiler. One less thing to worry about.That's not how it works. Programming is done by humans, and humans make mistakes. No amount of 'standardising the approach' (whatever the hell that means) or design is going to prevent humans from making mistakes.
We keep finding security problems related to memory management: buffer overflows, double frees, etc. You think all that code is written by amateurs who don't know what they're doing? No, it's written by professionals who know exactly how to prevent these things. But they are human, and they do make mistakes.
You can either bury your head in the sand and ignore this reality, or you can do something about it. A good way is to use a language that doesn't allow you to make these kinds of mistakes in the first place. That means a memory-safe language. That means one with strict static typing. This not only prevents bugs, it also frees up the programmer's mental bandwidth. If you don't have to think about accidental complexity you can put your energy into the actual problem you're trying to solve.