upvote
Re "c)": No, self-hosting is the biggest temptation, and the worst mistake, for any programming language. It's death to bootstrapping. However, if you do succumb to the temptation to self-host, having a C backend, as Copper does, is probably the best way to handle it.
reply
I've never really understood the opposition to self-hosting.

As long as:

* Your language is the kind of language that suits compiler development.

and

* You support compiling to C or something so that bootstrapping doesn't involve an opaque binary or compiling 30 different git commits in a row.

What are the downsides exactly?

reply
The usual argument is that it is a distraction when you’re designing a language, and it leads to programming languages that are all excellent for writing compilers and parsers, but not particularly good for other things.

Since the majority of programs are not compilers, it might make more sense to focus on interesting things that aren’t relevant to compilers.

Some ideas from the top of my head: async I/O, a great SIMD story, effect systems, robustness systems for long-running processes (I’m only aware of Erlang/Elixir), and many others.

Compilers do exercise some things, like error handling and memory management, but they’re not particularly difficult or interesting in general.

reply
What's the problem with self-hosting? I do imagine it's easier to write a compiler in something like Haskell.
reply
The problems with bootstrapping a self hosted compiler are often greatly overstated.
reply
Self-hosting is a trivial matter if you can roughly map a subset of features of an existing language to your language. Write bootstrap compiler in that language and translator in parallel (as long as you have good AST/LST), run conformance tests on both.
reply
As long as one of the backends is something widely available, I don't see a problem. C is a decent option. LLVM IR is another.
reply
This isn't at all true, as proven especially by Zig.
reply
I would go so far as to say Zig even tries too hard to solve it (although they reused existing technology they already wanted, so it was almost free). You can bootstrap a self-hosted compiler to new environments by porting the source, cross-compiling it, and scp'ing or otherwise downloading it over to the target. And that's if you don't want to just use QEMU to develop it. We already do this exact thing when developing for embedded devices or often any type of aarch64 programs.
reply
As someone who has monkeyed around with the zig compiler, having the bootstrap done made monkeying around way, way more straightforward than when it wasn't around. I will admit I don't know the details and it's possible the QOL improvements that affected me only depended on other things that got solved along the way. But I have been building the stage0 and stage1 compilers to get my first artifact when I bump to the latest.
reply
Why is it harder to bootstrap a self-hosted language than it is to bootstrap a language implemented in C, which itself must be bootstrapped?

Bootstrapping is a one-time cost, but implementing the toolchain in C is a cost everyone has to pay every single time they touch the toolchain source.

reply
What additional cost does it have to implement the toolchain in C? I would say there is some benefit in terms of implicit testing to have a compiler self-hosting. But having a toolchain in C also has real benefits.
reply
OOP is one of the weirdest topics in computer science in that no one can agree on what it means. Even proponents of “OOP” have wildly different ideas about what it means. For some it’s “encapsulation”, for others it’s “inheritance”, for others it’s “message passing”. It seems the glue that binds OOP proponents together is little more than the sequence of letters: O-O-P.
reply
I drank the Elegant Objects[1] koolaid, and recommend the two books (Elegant Objects vol 1 and 2) whole-heartedly to anyone interested in OOP. Pony lang lets you write 95% of the kind of OOP described in the books idiomatically, without any kind of crazy shenanigans.

I think most people today would say encapsulation and message passing are pretty core to the definition of OO and inheritance is largely seen as an anti-pattern.

One thing I really like about Elegant Objects is that it is very palatable to FP enjoyers. Objects must encapsulate state, but they must also be immutable. Good OOP is declarative like good FP. It looks a lot like lisp imo. You're encouraged to code against interfaces instead of using inheritance etc.

[1]: https://www.elegantobjects.org/

reply
Since we’re nitpicking: you used a double negative, which is a confusing way of communicating an idea.
reply
The bike shedders have entered the chat.

There's a difference between nitpicking the topic of the article and nitpicking someone's grammar.

reply
To be fair, it really is a confusing way of communicating, and it’s useful feedback when taken to heart.
reply
It's not confusing.
reply
> Not nothing, but I don't think it's incorrect to say has any more OOP than general purpose languages like Lua or JavaScript in that sense.

IMO, that text is confusing.

“Not nothing” is saying it has some OO features.

“I don't think it's incorrect to say has any more OOP than general purpose languages like Lua or JavaScript in that sense” = I think this language has more OOP than languages like Lua or JavaScript”

So, that more or less says “A, but A”. If so, what’s the “but” about?

reply
I think it needs more negatives. "I don't think it's incorrect to say [it does not have] any more OOP than general purpose languages like Lua or JavaScript in that sense".

I had retyped it a few times trying not to come off as overly negative or a jerk.

reply
> Not nothing, but I don't think it's incorrect to say has any more OOP than general purpose languages like Lua or JavaScript in that sense.

The comment is saying that the language has more OOP than Lua or JavaScript, but it seems like it might have been meant to say the opposite. That, and it appears to be missing a subject (which I assume to be ‘it’ or ‘the language in question’, based on context). So personally I do find it somewhat confusing.

The problem is not the double negative itself, though; it’s more how it’s being used in context here.

reply
It was also to me. I also prefer simple clear language, so much for my feedback. Can we now move on?
reply
Lampshading that you're doing something wrong doesn't make doing the thing less wrong. Hijacking a language post, of all things, to tell people some other completely unrelated project is better is ridiculously uncouth.
reply