Settings

Theme

AppCode Is Dead. Now What?

industriallogic.com

11 points by dannyow 3 years ago · 2 comments

Reader

w10-1 3 years ago

Apple has open-sourced the Swift syntax parser, and the compiler is migrating to a pure-swift frontend. The package manager is open-source. So there's plenty of opportunity for an open-source IDE -- built on swift. And the free Visual Studio Code support based on the Swift language is good enough for most features.

There's little hope that IntelliJ could extend their own tooling to Swift's evolving language. Indeed, Swift has compile-time-checked regular expressions, concretely-typed generics, and so much more not seen in other languages.

Swift is catching up to Rust's memory/ownership model and building out both C and C++ interoperation, making them a powerful solution for safe systems programming.

Refactorings across a class hierarchy don't help Swift much since value types are preferred.

What's really missing from XCode or Swift-LS is partial parsing: effective feedback when your code is incomplete or broken, and good feedback about the mini-build that parses the Package.swift declaration.

  • ohgodplsno 3 years ago

    SwiftSyntax is a Swift package, so to have SwiftSyntax work, your IDE needs to already be able to integrate with Swift. Needless to say, unless you're Apple, since nobody else uses Swift, it is going to be awful to make it work because Swift has its own calling convention, the only way to call swift is through cinterop and requires an @_cdecl() attribute on the Swift function you're calling. Apple does not expose any of this. The Swift calling convention is a barely documented piece of shit. Additionally, SwiftSyntax is fully unable to handle partial bits of code, which is a non starter for any IntelliJ IDE. The difference between how responsive IDEA is when adding code and XCode that waits for 5 seconds for the parser and compiler to stop dying before giving out an awful error message is night and day, and no IntelliJ user would ever accept such an experience.

    >Swift has compile-time-checked regular expressions

    And IntelliJ has had inspections over regular expressions for a decade, nothing special about it, or hard to implement.

    > concretely-typed generics

    Handled for years by IntelliJ.

    > so much more not seen in other languages.

    I'd be curious to see a list, because there's not much that is very special about Swift.

    The biggest problem that AppCode faced is that even when they open source things, unless it grows way beyond Apple like LLVM did, Apple still only does things for Apple. They have no incentive of making Swift-Syntax easy to consume and use. For the longest time, they would push gigantic dumps of commits to the various Swift repos on release date, meaning that Xcode would already have everything integrated, and others are left to play catch-up. This is entirely done on purpose to kneecap competitors.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection