• 1 Post
  • 178 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.



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