Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there a language server for Swift that does not suck?

I believe swift is a good language, however its ecosystem being steered by apple is a massive red flag. It also suffers a bit from being a commercially developed language in that its developers are clearly incentivized to add more features.



> a commercially developed language in that its developers are clearly incentivized to add more features.

Do you have any evidence this is true? Most programming languages are developed either by a company (C#, Java, Swift, Go) or heavily influenced by many companies (Python, JavaScript, C++). Java had been criticized forever (until very recently) for it's slow pace of development and it was 100% controlled by either Sun or Oracle.

Comments like these show just how little developers investigate the reasons why features they personally dislike were introduced to a language.


As a professional Java developer its new feature pace is still slow. It’s a little better but it hasn’t been fast in a VERY long time.

But that’s OK. They do an amazing job of maintaining backwards compatibility and making things fit in the language well as well as trying to get it right the first time.

Some languages are more willing to remove things that don’t work. Others are willing to have multiple different attempts that all work completely differently every few years.

In many ways that’s just not Java’s style. And that’s OK.


If you want to move faster in JVM world use Kotlin. There is no alternative in .NET world- that’s why JVM ecosystem is much better (and bigger)


I’m actually quite happy with how it’s done, but I know many others aren’t.


F# would be the alternative.


F# is not mainstream lang - it’s more like Clojure for .NET. My point was - you don’t have that variety in .NET as in JVM (Scala, Kotlin, Groovy are all relatively mainstream)


Kotlin is only mainstream on Android because Google says so, Groovy is barely kept alive thanks Gradle, and if it wasn't for Kafka and Spark, Scala would have been long gone.

Hardly any better than F#.


Well you are clearly out of JVM world. See supported langs here https://start.spring.io/ (most popular JVM framework)

Kotlin is especially popular on backend if you can’t jump out of JDK8

F# is functional - by definition not mainstream


I am on JVM world since 1996.

Spring supports anything that can bring them support contracts.

Kotlin, popular outside Android?

Reality check over here,

https://spectrum.ieee.org/the-top-programming-languages-2023


Don’t get me wrong F# seems like a nice lang but definitely not mainstream (non geeks don’t use purely functional langs).

You can’t deny Kotlin is bigger lang than F# by any ranking from those popular (Tiobe) to unknown ones and is build on top of much bigger ecosystem (JVM) - that’s IMHO much more important factor for anyone doing commercial projects.

Additionally there is a big incentive to use it over Java (if you are stuck with older JDK) contrary to using F# over C#

Kotlin as a lang is better than C# (which is normal - it’s newer) and has better default IDE (IntelliJ) than anything on the market.


This is like discussing which homeless has better clothes, while the society doesn't care about both of them.


Well a bit exaggerated. Seen two Fortune 500 companies moving all never stuff to Kotlin on backend on my own eyes (for the reason I mentioned above) in some branches.


sourcekit-lsp works really well, VSCode integration is solid[1]. I've been using VSCode+dev-containers+sourcekit-lsp for a couple years now for Linux development on macOS and it has been really nice.

I agree that this is a must-have for idiomatic Swift. It is really hard to write the long-named-functions and get all the variable names correct without reasonable autocomplete.

[1]: https://www.swift.org/blog/vscode-extension/


I was curious and noticed that this looks reasonable: https://github.com/emacs-lsp/lsp-sourcekit

Emacs + lsp-mode + sourcekit + company-mode etc looks reasonably close to what I get with Rust in Emacs.

If I were doing application development I'd maybe consider Swift.


VS Code isn’t too bad, it after ~20 years of Xcode/Project Builder, muscle memory for keybinds and UI in general is strong. Hoping that someone uses the LSP to write a cross platform “Xcode Lite” or something along those lines.


It wasn't too bad to switch for me, but the problem is going back and forth. I don't love over-customizing my IDE but I've created my own keybindings for the commands I mis-type most (Command-R to run being the main culprit). Both Xcode and VSCode support custom key bindings and this isn't something that the LSP is responsible.

UI is a different matter. Xcode is still miles ahead in performance tooling.


It’s not a commercially developed language; it’s open source and many of its features have been developed outside of Apple.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: