Comment by hypeatei

6 hours ago

> ease of binding to C++

I wouldn't really call this an "ergonomic" feature of a language. That's a whole research project.

Regardless, C++ interop in Swift isn't straightforward and there are a multitude of issues. One being that you need to compile your C++ codebase with Apples fork of LLVM and in some cases add annotations in your C++ so that Swift plays nice (which basically isn't interop at that point)

You can see the Ladybird projects issue tracker[0] and issues on the Swift forum that LB maintainers have created[1][2] to get an idea. Swift adoption has stalled due to these.

0: https://github.com/LadybirdBrowser/ladybird/issues/933

1: https://forums.swift.org/t/ladybird-browser-and-swift-garbag...

2: https://forums.swift.org/t/ladybird-gc-and-imported-class-hi...

It’s not perfect but if that’s your standard, then that cuts a lot of stuff from both languages :-)

I’m not sure why annotations are a bad thing to you. They’re not necessarily swift specific and could benefit other bindings too, and their existence doesn’t mitigate that it’s a binding. Or do you not consider rust being bindable to any non-C language since you’d have to write CFFI bindings in between?