The reason C becomes relevant to Python users isn’t typically because the interpreter is written in C, but because so many important libraries (especially numpy) are implemented in C.
The reason C becomes relevant to Python users isn’t typically because the interpreter is written in C, but because so many important libraries (especially numpy) are implemented in C.
I’m a Rust fan, and I do think they eventually struck a pretty good “visibility vs noise” balance with ?
(which was highly controversial at the time).
I should have stressed the “opinion” part of “IMO”. What I mean is that, when I read this, it struck me immediately as being exactly correct: https://joeduffyblog.com/2016/02/07/the-error-model/
The problem is that most languages with exceptions treat that as the idiomatic error mechanism. So checked exceptions were invented, essentially, to do exactly what you say: add the exception type to the function signature.
Having separate errors-as-return-values and unwinding-for-emergencies is a much more recent trend (and, IMO, an obviously good development).
Yes. True. But Uncle Bob literally complains about non-nullable types in the linked blog post.
I’m not saying testing isn’t important. I’m saying that hand-written unit tests are not the end-all be-all of software quality, and that Uncle Bob explicitly believes they are.
The blog post? Yeah, that was the moment I lost most of my remaining respect for his tech opinions.
Unlikely, unless his view has changed substantially in the last seven years: https://blog.cleancoder.com/uncle-bob/2017/01/11/TheDarkPath.html
I think his views on how to achieve good quality software are nearly antithetical to the goals of Rust. As expressed in that blog post and in Clean Code, he thinks better discipline, particularly through writing lots and lots of explicit unit tests, is the only path to reliable software. Rust, on the other hand, is very much designed to make the compiler and other tooling bear as much of the burden of correctness as possible.
(To be clear, I realize you’re kidding. But I do think it’s important to know just how at odds the TDD philosophy is from the “safe languages” philosophy.)
deleted by creator
It’s not so much a problem of there being things you “can’t do” in other shells or older Bash, as that it breaks existing shell scripts, which is frustrating.
Just because it doesn’t matter for most users doesn’t mean it isn’t a real limitation. I acknowledged as much in my original comment.
Did you read the linked Q&A?
What do you get if you run /bin/bash --version
?
You get admin privileges on MacOS like a big boy. You can use bash or zsh commands in Terminal all you want.
Cool. So try updating to a version of Bash from the last 15 years, because the pre-installed one is Bash 3, because Bash 4 and 5 are under the GPLv3 license, which Apple won’t comply with.
…ah, no, you can’t update the pre-installed Bash, because it’s on a section of the file system that is read-only even with admin access. You can install Bash 5 as a separate shell, and use that as your default terminal shell, but any scripts written with the standard instead of the more flexible
will still use Bash 3.
This “handholding” (or really, a safety net) is arguably a good thing, or at least a positive tradeoff; but you can’t claim it doesn’t exist.
Regular vim has that (as a compile option, like most of its features).
rm - rf
is the only version that makes sense, since the only reason to delete and re-clone is to recover from an unexpected .git/
state, and git rm
won’t remove that.
Sorry, why would you be “boned” if you have UTC time? Are you thinking of the case where the desired behavior is to preserve the local time, rather than the absolute time?
I’m not totally clear on why signals are used here in the first place. Arguably most C code doesn’t “need” to use signals in complex ways, either.
The trope will be “old” once the mainstream view is no longer that C-style memory management is “good enough”.
That said, this particular vulnerability was primarily due to how signals work, which I understand to be kind of unavoidably terrible in any language.
Indeed, I had no idea there are multiple languages referred to as “APL”.
I feel like most people defending C++ resort to “people shouldn’t use those features that way”. 😅
As far as I can tell, pointer arithmetic was not originally part of PASCAL; it’s just included as an extension in many implementations, but not all. Delphi, the most common modern dialect, only has optional pointer arithmetic, and only in certain regions of the code, kind of like unsafe
in Rust. There are also optional bounds checks in many (possibly most) dialects. And in any case, there are other ways in which C is unsafe.
True, but AFAIK they all sucked really bad.
That’s pure assumption and, as far as I can tell, not actually true. PASCAL was a strong contender. No language was competitive with handwritten assembly for several decades after C’s invention, and there’s no fundamental reason why PASCAL couldn’t benefit from intense compiler optimizations just as C has.
Here are some papers from before C “won”, a more recent article about how PASCAL “lost”, and a forum thread about what using PASCAL was actually like. None of them indicate a strong performance advantage for C.
Extension modules can be, and are, written in Rust and C++. And PyPy has a compatibility layer to run extensions (such as numpy) that are written for CPython.
The reason extension modules are typically in C is of course the API is in C, but that’s true of
cffi
as well (though you’re right thatcffi
is more portable). And the reason the API is in C is more fundamental than “CPython is written in C”.