• 1 Post
  • 239 Comments
Joined 11 months ago
cake
Cake day: August 18th, 2023

help-circle
  • 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.



  • C++11 also introduced new problems, such as the strange interaction between brace-initialization and initializer-lists (though that was partially fixed several years later), and the fairly arcane rules around move semantics with minimal compiler support (for example, it would be great if the standard required compilers to emit an error if a moved-from object were accessed).

    I know Lisp is minimal, I’m just saying that I expect there are Lisp fans who won’t acknowledge (or would excuse) any shortcomings in the language, just as there are C++ fans who do the same for C++.





  • I see where you’re coming from, but no matter how many null pointer exceptions there are in Java code, you’re almost always protected from actually wrecking your system in an unrecoverable way; usually the program will just crash, and even provide a relatively helpful error message. The JVM is effectively a safety net, albeit an imperfect one. Whereas in C++, the closest thing you have to a safety net, i.e. something to guarantee that invalid memory usage crashes your program rather than corrupting its own or another process’s memory, is segfaults, which are merely a nicety provided by common hardware, not required by the language or provided by the compiler. Even then, with modern compiler implementations, undefined behavior can cause an effectively unlimited amount of “bad stuff” even on hardware that supports segfaults.

    Additionally, most languages with managed runtimes that existed when Java was introduced didn’t actually have a static type system. In particular, Perl was very popular, and its type system is…uh…well, let’s just say it gives JavaScript some serious competition.

    That said, despite this grain of truth in the statement, I think the perception that Java is comparatively robust is primarily due to Java’s intense marketing (particularly in its early years), which strongly pushed the idea that Java is an “enterprise” language, whatever that means.














  • I was curious about the Python connection because multiple comments mentioned it, but I’ve worked on multiple Python projects over the past dozen-ish years and never seen that operator.

    Turns out it was introduced in 3.8, released in 2019, so it was much too late to inspire Go, and most of the projects I’ve worked on were written to target an earlier Python version. It also has a substantially different meaning than in Go.

    I don’t know if there’s an “official” rationale for the Go syntax, but := is a fairly common (but not ubiquitous) math notation meaning “define the thing on the left to be equal to the expression on the right”, i.e. to distinguish it from the other use of =, i.e. “the expression on the left must be equal to the expression on the right.” Go’s usage matches this mathematical meaning of introducing a new variable definition pretty well.