Hacker News new | ask | show | jobs
by sparky4pro 382 days ago
Swift is usable (on Apple operating systems) if you use the add ons that Apple provides (like SwiftUI). Other than that… forget about it. Tried to use Swift for CLI apps (on macOS) and it failed miserably. The reason: after reaching a certain code size the Swift compiler is reporting vague syntax errors without line numbers. Unacceptable in 2025.
1 comments

I can’t speak to the errors you’re seeing, only that my experience is different. I’ve written well over a hundred CLI apps on macOS, of all sizes. I consider it a very good language for it too (also for scripting). A nice thing is that you can leverage the whole of AppKit/Foundation/Carbon/etc in CLI apps allowing for uniquely powerful tooling & integration.
I’m happy for you and everyone else who has had the same experience as you. I’ve saved my Swift CLI apps, so I might try it again when a new version comes out, hopefully they fixed such behavior.