3 ms·
I think swift is a really great language from the design perspective. What makes it unusable outside the apple ecosystem imho is that while the C interop is am
by randomNumber7 6mo ago
I think swift is a really great language from the design perspective.
What makes it unusable outside the apple ecosystem imho is that while the C interop is amazing on paper, it sucks hard in practice due to the abomination of pointer types they build in.
The "all pointers are evil" attitude doesn't help when you want to use a C library and noone will write rewrite all these libraries.
- tracymiranda 6mo agoSome recent fixes went into 6.2.3 which really help with C interop, this post shows what that looks like in practice https://www.swift.org/blog/improving-usability-of-c-libraries-in-swift/ https://www.swift.org/blog/improving-usability-of-c-librarie...
- frizlab 6mo agoyup, it got much better recently
- randomNumber7 6mo agoThese look mostly like toy examples where the type of the pointer can be inferred from the return values of the functions. How do I call this function in swift? SDL_AudioSpec* SDL_LoadWAV_RW(SDL_RWops * src, int freesrc, SDL_AudioSpec * spec, Uint8 * * audio_buf, Uint32 * audio_len);
- jumploops 6mo agoIt's ugly[0] and I haven't checked it deeply for correctness, but you should get the gist (: I hate vibecoding. The cognitive toll is higher than you expect, the days feel fast, but the weeks move slowly. With that said, these are the new compilers. Hopefully they make some software better[1] even with the massive increase in slop. [0]https://gist.github.com/jumploops/b8e6cbbce7d24993cdd2fe24258aaf39 https://gist.github.com/jumploops/b8e6cbbce7d24993cdd2fe2425... [1]https://red.anthropic.com/2026/mythos-preview/ https://red.anthropic.com/2026/mythos-preview/
- jumploops 6mo agoNot to be that agentic coding guy, but I think this will become less of a problem than our historic biases suggest. For context, I just built a streaming markdown renderer in Swift because there wasn’t an existing open source package that met my needs, something that would have taken me weeks/months previously (I’m not a Swift dev). Porting all the C libraries you need isn’t necessarily an overnight task, but it’s no longer an insurmountable mountain in terms of dev time.
- MattDamonSpace 6mo agoMy favorite part is the AI will still estimate projects in human-time. “You’re looking at a multi-week refactor” aaaaand it’s done
- nothinkjustai 6mo agoYeah lol. “I estimate this will take 15-20 days” I do it in like 5 hours lol
- buzzerbetrayed 6mo agoVery high quality comment that is being downvoted unfairly because it defends AI. HN is on the wrong side of history on this one.
- inunuftbkj 6mo agoNah. We’re right on the money with this one. AI is a nice tool to have available, but you AI nuts are the ones being voluntarily and gladly fed the whole “you’re a bazillion times more productive with our AI!!!!” marketing spiel. It’s a nice tool, nothing more, nothing less. Anything else is marketing nonsense.
- randomNumber7 6mo agoIt's not necessary to rewrite perfectly fine libraries written by exceptional programmers. And whoever thinks it is an easy task (sorry rust guys) is severely suffering from the dunning-kruger effect.