Transpiling to C++ for maximum interop with the SerenityOS codebase was an interesting idea too, but what it meant was you had to interpret C++ compiler errors to to understand what was breaking a lot of the time
1: Here's my admittedly crappy markdown->HTML converter written in Jakt https://github.com/mikeakers/r3gen
I also contributed some patches to Sophia's jaktnesmonster NES emulator a few years back, adding support for some popular mappers, as well as a TempleOS port, and more recently wired everything up[2][3] to use Serenity's native libraries (LibGUI, LibAudio, etc.)
1: https://github.com/slon-project/slon
Worth mentioning that the Jakt compiler is self hosting as well
Some work to do with making Swift work with ladybird's garbage collection but my understanding that this work is in progress.
Andreas talks about it here: https://www.youtube.com/watch?v=z1Eq0xlVs3g&t=759s
Besides, polling enjoyment is not exactly what I would describe as a pragmatic approach.
1 - memory safe (ish)
2 - OOP
Rust was off the table because of number 2. The list gets short after that.
All the COM programming patterns can be easily done in Rust.
Here, ray tracing in one weekend, quite closely translated from the original C++ OOP design into Rust.
[0]: https://github.com/LadybirdBrowser/ladybird/issues/933
[1]: https://github.com/LadybirdBrowser/ladybird/issues?q=is%3Ais...
Not only does it predate the language by a few decades, there is enough type systems variants to chose from.
Which is to say, falling out with Andreas IMO is less than likely, dude just seems nice from the onset, but with changing tides in project it is highly likely that people just became uninterested over time.
And do you see that as a good or bad thing (genuine question, just curious)?
Contrary to Go folks, Swift designers have done their work why some approaches are better than others based on historical use of language features.
But that's not the world Swift was born into and so it has both classes that are optionally Obj-C compatible and structs
This is hard to implement in a memory-safe language. For example, the new WASM GC virtual machine does not support interior pointers.
I noticed this distinction recently, regarding the rewrite of TypeScript in Go:
https://lobste.rs/s/3q0ei5/10x_faster_typescript#c_xndrsg
- C#, Swift, Julia, Nim, Crystal, and very recently OCaml have separate value types and reference types. The choice is not orthogonal, which is what you don't like. (Java, Python, etc. do not have value types at all)
- Only Go and D have the memory model of C (values and references), with GC.
- Rust has also has the model of C, but with "static memory management"
Sounds pleasant and safe to use. I wonder if they plan to use it on their Ladybird browser.
From their readme:
Automatic reference counting
Strong typing
Bounds checking
No raw pointers in safe mode
Null pointers are not possible in safe mode, but pointers can be wrapped in Optional, i.e Optional<T> or T? for short.
Integer overflow (both signed and unsigned) is a runtime error.
Numeric values are not automatically coerced to int. All casts must be explicit.
and more.
Very good taste for an American.
> It currently transpiles to C++
So C++ being safe was possible after all
Then I noticed structured exception handling. Oh well.
this is applicable to web-era languages circa the times of PHP thru Java.
Async await and unwrap is ugly.
Lambdas and binding of locals is very ugly as well. Any fake lifetime errors I get are solved by a data type and impl which is just confusing, as if lambdas are a problem.