(no title)
JackYoustra | 29 days ago
- Xcode. A really rough ide that has a hard time at scale, choking on package refreshes, many targets, and more. It has a special entitlement so you can't even binary patch it if you want to fix it!
- Build systems. Cargo is _much_ easier to work with than SPM.
- Macros support, codegen is still largely done outside of the macro system, which should indicate its use.
- Linter / format support. Yeah, it exists, last I checked it's just a good bit worse.
- Performance. There are MANY performance cliffs in Swift; most can be fixed by a sufficiently determined compiler developer, but at this point we've kinda departed talking about the language as-is.
- Type inference time. Swift's bidirectional type inference causes a ton of choking on complex expressions, which is a real problem with its number one use case, SwiftUI.
- An exacerbating factor on the above, imports are all implicitly module-scoped, meaning that changing a single file means recomputing the types for all files in the module. And because SPM and Xcode have such a rough time with multiple targets, that usually means that a single change can lead to recompiling all Swift files.
- Weirdness around classes and structs? I understand that they had to do it for objc compatibility, but I would've found it much cleaner if they'd just from the start had something replacing class, like a fully-sugared `final class Box<T>` that replaces all uses of class.
I agree that for the most part it _could_ be an easier rust, but between including bidirectional type inference without a cut operator and poor tooling I struggle to find where it's actually easier in cases that you can't just use typescript and dodge all the non-typecheck compilation headaches entirely.
atombender|29 days ago
I've thrown Claude and Gemini at the app to try to analyze the code, had them use vmmap and Instruments, asked them run all of the code in a loop to reproduce the leakage — and still it leaks, slowly, tens of megabytes per day.
I'm sure it's something simple starting me in the face. But the fact remains that Swift's sort-of-automatic-but-not-quite memory model still makes it much harder to reason about memory than Rust or even Go.
rTX5CMRXIfFG|29 days ago
And of course, Apple's UI frameworks != Swift the language itself.
teunispeters|29 days ago
maksimpiriyev|24 days ago
waffletower|27 days ago
cosmic_cheese|29 days ago
I wasn’t of the mind that AppKit/UIKit really needed replacing in the first place, though…
jabwd|29 days ago
If its a reference cycle, instruments will find it. If it is a leak, instruments will find it. However, you seem to be worried about an implementation detail on how you get memory from your CPU which the mach kernel handles for you, and is something you don't quite grasp.
please don't reply with "I asked stupid generator", seriously, what is the actual issue you have?
groundzeros2015|29 days ago
heavyset_go|29 days ago
saagarjha|28 days ago
lelanthran|28 days ago
I mean, even if valgrind ran on MacOS, it may still not give anything meaningful because the debug symbols are probably not going to be the same as that generated by GCC, and even if they were the same, there's still gonna be a bunch of symbols "missing" because of internal swift name-mangling, and even if that wasn't the case, the emitted code might just not be ABI compatible with C anyway.
dfabulich|29 days ago
alwillis|29 days ago
If you hate Xcode, this is definitely worth a look.
[1]: https://notepadexe.com
[2]: https://notepadexe.com/news/#notepad-14-linux-support
behnamoh|29 days ago
mort96|29 days ago
frizlab|29 days ago
Unless you’re doing Apple-specific development, you don’t need Xcode.
truncate|29 days ago
wolvoleo|29 days ago
But if you don't want to include those I wouldn't pick a language that's under control of a company I don't use.
It's a bit like using c# or powershell on Linux. Yes it can be done and it's helpful for cross platform with windows but I wouldn't consider it a first class citizen.
teaearlgraycold|29 days ago
hn-acct|29 days ago
willtemperley|29 days ago
I’m not sure why you’re having so much trouble with SPM though, most people seem to get on well with it.
hn-acct|29 days ago
ElFitz|29 days ago
But I guess the issue here is that .xcframework is an Apple thing, not a Swift thing.
The whole "won’t build if the product / target has the same name as one of its classes" is absolutely ridiculous on the other hand.
cosmic_cheese|29 days ago
JackYoustra|28 days ago
Being explicit with types is very disruptive when used in SwiftUI or TCA.
h4x0rr|29 days ago
plagiarist|29 days ago
stackghost|29 days ago
fluffybeing|26 days ago
blueprint|29 days ago
jayd16|29 days ago
cosmic_cheese|29 days ago
andoando|29 days ago
Errors everywhere with horrible messages that leave you no idea whats wrong
peyton|29 days ago
jtrueb|29 days ago
mrcwinn|29 days ago
doawoo|29 days ago
lawgimenez|29 days ago
latexr|29 days ago
You don’t need it to program in Swift. I write a lot of it and never open Xcode, my terminal editor with LSP support is fantastic at it.
Imustaskforhelp|29 days ago
when you mention terminal editor, I think you are a Neovim user right?
crowbahr|29 days ago
ks2048|29 days ago
andrekandre|29 days ago
JackYoustra|27 days ago
easeout|29 days ago
Xcode is optional, though its primacy has meant less adoption of Swift's first party LSP and VS Code extension.
hota_mazi|29 days ago
hn-acct|29 days ago
ks2048|29 days ago
Imustaskforhelp|29 days ago
(I am not familiar with swift which is why I am asking this question if there's a really big difference between Swift package manager and cargo in the first place to warrant a uv like thing for swift ecosystem. I think someone recently posted a uv alternative for ruby)
Rv, a new kind of Ruby management tool: https://news.ycombinator.com/item?id=45023730
hboon|28 days ago
jbverschoor|28 days ago
geooff_|29 days ago
monster_truck|28 days ago
It remains the only UI framework I've prototyped something in where I've had to respond to a well paying client with a list of what it (still!) can't do, doesn't do well, and a long list of documentation that does not match the code. I have a sense of integrity so I do this work honestly. There are plenty of devs out there that will happily tell you xyz can be done just so that they're paid to make something they know will be subpar.
fragmede|29 days ago
JackYoustra|29 days ago
You can also sometimes avoid xcode, see https://github.com/xtool-org/xtool
although, at this point, just use expo!
snickell|29 days ago
bjtitus|29 days ago
The license is pretty much Apache 2.0
hedora|29 days ago
My code was data race free, but the underlying OS primitive wasn’t, so my program crashed out about 10% of the time.
This isn’t really a criticism of swift as a language, but I haven’t had this sort of problem with the rust ecosystem.