Better HN
topnewbestaskshowjobs
Log inSign up

BodkinsOdds

2 karma · joined Jun 15, 2024 (2y ago) · 6 submissions

Submissions

comment 1y ago · link · parent

C++ is already so reliant on optimizing `const&` parameters that I can't imagine why you wouldn't use them if you happen to be stuck with a shitty embedded toolchain (or MSVC) that can't be relied on to pass struct parameters efficiently.

comment 1y ago · link · parent

Needing that MakeArguments macro makes this substantially worse than just defining an aggregate struct for your arguments and using designated initializers. I've never wanted to reorder named arguments anyway, I've only ever wanted to elide some of them.

comment 2y ago · link · parent

There's a couple:

https://github.com/stackotter/swift-cross-ui (Linux + Windows)

https://github.com/TokamakUI/Tokamak (WASM + MacOS + some Ubuntu support)

They both had to rewrite the entire backend from scratch, because SwiftUI is very, very closed source. But Tokamak does have an import that just forwards to SwiftUI on Apple platforms.

comment 2y ago · link · parent

- Anonymous enums/structs in parameters/match statements

I'm not sure what you mean by this, could you elaborate?

comment 2y ago · link · parent

Nope. For the foreseeable future, stable ABI on other platforms is basically only going to happen if a distro starts supporting an ABI stable standard library on their own.

comment 2y ago · link · parent

Go is the only one of the three that directly uses syscalls. Rust and Swift both go through libc. Swift never even had the option of directly using syscalls, since it was originally designed for MacOS, and syscalls are so unstable there that they've changed in minor version updates.