• 1 Post
  • 242 Comments
Joined 10 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.



  • I’m honestly not convinced JavaScript is good even for the front-end, because it’s intentionally designed to swallow, ignore, and otherwise minimize errors; which is not helpful at all for development of any software. My point is that the only reason JavaScript is dominant in front-end development is that, prior to WASM, it was literally the only option; if that hadn’t been the case, I doubt it would have become nearly so widely used.


  • 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++.


  • Sounds like we’re actually in agreement about most of this.

    I’m okay with languages limiting their “expressive” power in order to provide stronger correctness guarantees or just limit how “weird” code looks; but this is largely because I’ve worked on many projects where someone had written a heap of difficult-to-understand code, and I doubt such limitations would be appealing if I were working strictly on my own.

    I also don’t really see the appeal of Java-style inheritance, but to be honest I didn’t use Scala for long enough to know whether or not I agree that Scala does inheritance “right”.

    It does make sense that Rust provides mutability in some cases where Scala doesn’t. Rust’s superpower, enabled by the borrow checker, is effectively “safe mutability.” I hope other, simpler languages build on this invention.





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