← Back to context

Comment by CyberDildonics

2 years ago

Two of the most widely programming languages

Widely used? This is the point. The programs that people use directly are written in C++. Programmers try to get away with garbage collection because it's what they want, not what people using software want.

Those are nowadays runtimes with garbage collection and multiple languages.

That's like saying typescript can be used in javascript, it's all the same underneath. It isn't the same as something native that can be used and consumed anywhere else. Software in non native languages keeps getting re-written over and over and not widely reused. Once someone does something natively and does it well like sqlite, image libraries, etc. it stays done.

> The programs that people use directly are written in C++.

There is a lot C/C++ around and they are widely used to implement runtimes for other languages, incl. garbage collection. Lot's of software people use directly or indirectly is written not in C++.

> That's like saying typescript can be used in javascript

That's another option how to integrate languages: TypeScript is transpiled to JavaScript. C can also be transpiled to JavaScript. Emscripten can compile LLVM instructions to JavaScript and Webassembly. JavaScript/Webassembly then gets compiled to native instructions.

low-level infrastructures like the JVM create native code from Java (and other languages using the JVM), by compiling to machine code.

> It isn't the same as something native that can be used and consumed anywhere else.

Programs with garbage collection also run "native". The garbage collector is a native part of the program.

> Once someone does something natively and does it well like sqlite

sqllite is not written in C++, it's written in C. As the first three letters tell us, it implements a language called SQL. sqllite also comes with its own dynamic memory management system: https://www.sqlite.org/malloc.html

sqllite is an excellent example, where C is used to implement a higher-level language (here SQL) and a complex memory management for it.

Btw., I'm typing this now on a iPad, where the user side of software is mostly implemented in Swift or Objective C, which use "reference counting" for memory management. The browser I'm typing to uses a system provided JavaScript engine with garbage collection. The site I'm using (Hackernews) is written in Arc (which is a Lisp dialect), which runs on top of a variant of Scheme, which is another Lisp dialect, which provides a garbage collector.

  • This really illustrates my point. Programmers go through all sorts of rationalizations to pretend that what their favorite thing or the one thing they know is just as good as anything else to distribute to people and it's not.

    sqllite is not written in C++, it's written in C

    Probably why I said native.

    higher-level language (here SQL)

    Not the same of course. All this mixing of of terminology and pretending that SQL is the same as any other language or that reference counting is the same as typical garbage collection even though it is deterministic, gradual and doesn't need to be applied to stack variables is the kind of circular nonsense that hurts people who have to use software made by programmers who don't care about the end results.

    Trying to pretend java compilation is the same as a C library or that two languages targeting the same vm means there is somehow an ecosystem that works with other things is the kind of circular technicalities of pretending the blanket terms apply to everything equally is how we end up with giant bloated java or electron desktop software that pauses and stutters trying to do something that was fast 30 years ago.

    This is also why lisp is still a nonsense language after 60 years. Pragmatically it doesn't deliver and there are no upsides to having huge binaries and backwards syntax. People can pretend that modularity, dependencies, garbage collection, syntax and eco systems don't matter, but it's all rationalization of people trying to pretend reality is something it's not.

    People don't want bloated slow software, they don't want GC pauses and stuttering and trying to pretend that hundreds of megabytes of java or lisp dependencies for hello world is the same as C is just sticking your head in the sand.

    • > People don't want bloated slow software, they don't want GC pauses and stuttering and trying to pretend that hundreds of megabytes of java or lisp dependencies for hello world is the same as C is just sticking your head in the sand.

      Baaaaased CD!

      Garbage collection has no reason to exist in a world where Rust shattered the false dichotomy, proving you can have safety and speed.

      For scripting, like with Python, GC is okay.

      For significant software, the GC'd langs are almost all mediocrity-enabling abominations created out of corporate greed. Oracle made Java for the same reason that Microsoft made C# and the reason Google made Go; they can't find enough C/C++/Rust programmers, and they want to have their cake and eat it too.

      Functional languages are an exception to that criticism though. They're not corporate abominations; they're a weird utopian experiment from simpler times, which, like the corporate abominations, bet that the party would never end, that Moore's law would carry us to heights or CPU power where the bloat is negligible. That was more correct with memory than with processing speed, but it seemed like a bad bet nonetheless.

      1 reply →