logoalt Hacker News

randomNumber7yesterday at 9:21 PM2 repliesview on HN

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.


Replies

tracymirandayesterday at 9:34 PM

Some 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-librarie...

show 2 replies
jumploopsyesterday at 9:52 PM

Not 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.

show 3 replies