by soegaard on 12/14/24, 10:58 PM with 132 comments
by buggy6257 on 12/15/24, 12:43 AM
The most value from this article is the clickbait title yielding some interesting discussion from people on that question outside of the actual article contents.
This article isn’t bad but the name is terrible and a bit clickbaity
by MrMcCall on 12/15/24, 1:59 AM
That can be accomplished for most software projects in most programming environments and their languages, to more or less extent within their limitations, given a proper amount of hard graft to choose the proper constructs and then brutally test them.
Power, on the other hand, must be dependent on what is required to wring safety out of the limitations, weaknesses, and pitfalls of the chosen implementation tooling. Power can include speed of development, speed of execution, amount of concurrency, fault tolerance, and so on. Regardless, power must be built upon safe software constructs, safe in the sense that the resulting system performs as intended.
A civil engineer will know that a specific kind of bridge constructed out of certain materials using certain techniques will be able to withstand certain events like an earthquake of a certain magnitude and will be able to perform at a certain level, such as tons of traffic at a time or somesuch. As well, they will have a pretty good idea of how long it will take to build it. Such is the maturity (and relative simplicity!) of bridge building.
We have no such framework in our industry. Focusing on programming languages shows the immaturity of our industry, which is the most difficult we have yet undertaken as a technological civilization. The proof of that statement is that all our technologies depend on software systems.
by kazinator on 12/14/24, 11:17 PM
Safety is the property that erroneous situations are intercepted and diagnosed, rather than running off with incorrect results or behaving unpredictably. It can be a continuum based on the number and kinds of situations that are treated safely.
by more_corn on 12/15/24, 9:18 AM
by tbrownaw on 12/15/24, 6:17 AM
And then of course "safe" means you can't express things you shouldn't want to express, like buffer overflows or arithmetic overflows or SQL injections, or these days prompt injections.
by ashoeafoot on 12/15/24, 4:19 PM
All within one engine, your elders giving and taking your freedom.
by lilly-lizard on 12/15/24, 4:45 AM
by lizzas on 12/15/24, 3:02 AM
I was gonna say "what about Racket"! And that is what they land on.
by awinter-py on 12/15/24, 5:30 PM
I have met a style of programmer who thinks, on some level, that generally reusable code is unsafe -- like the `sum` function (stupid reductive example) is not okay unless it has a bunch of business logic restricting the range of the numbers and takes a logger just in case, and the function name is eight words describing exactly what's happening, and the base and the mantissa have different types
and you end up with no general code anywhere because reusability is not even an afterthought, it is counter to the project
if you've never met this person I sound insane but I swear they exist
by sega_sai on 12/15/24, 4:38 PM
by FpUser on 12/15/24, 3:09 AM
>"name = get_user_name(user)"
>"and I didn’t have to worry about user getting modified in the call to get_user_name."
If you have this case it is not the language you should worry about but a moron programmer you work with.
by 2OEH8eoCRo0 on 12/15/24, 8:21 PM
by mock-possum on 12/15/24, 5:27 AM
Less safe more powerful gives you more options.
You can always make things less safe - it’s hard to make them more powerful.
by rafram on 12/15/24, 4:33 AM
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value'
by 0points on 12/15/24, 4:31 PM
by AzzieElbab on 12/15/24, 12:53 AM
by Animats on 12/15/24, 2:54 AM
Macros tend to be hard to read. LISP macros and C++ templates are the usual bad examples. As the article points out, Rust procedural macros are not all that great. They do, though, power Rust's "derive" facility and the serialize/deserialize functions. Those have a simple user interface which hides the internal complexity.
by roca on 12/15/24, 12:45 AM
No, it really isn't. It's 2024, people who should know better should stop saying this.
by CodeWriter23 on 12/15/24, 1:35 AM