Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
airspeedswift
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
airspeedswift
3mo ago
You can choose to use either refcounting or unique ownership for your types. For most use cases, refcounted (+ copy-on-write) is the best choice and is the default, but the truetype interpreter made extensive use of non-refcounted types to
2.
▲
by
airspeedswift
3mo ago
I assure you, every inch of the interpreter code has been stared at by humans, a lot. TBH even the assembly generated by it has.
3.
▲
by
airspeedswift
11mo ago
Python and LIT are used heavily to build and test the compiler, but that is only for building it, you do not need it to download and use the built toolchain. The python dependency is more about its use in LLDB.
4.
▲
by
airspeedswift
11mo ago
The Swift toolchain includes LLDB, which relies on python for some debugging features. The compiler and runtime itself do not use python.
5.
▲
by
airspeedswift
11mo ago
> e.g kotlin exceptions cant be caught from swift FWIW the approach that swift-java takes in managing interop with Java (and potentially Kotlin) function calls means it is perfectly possible to to catch exceptions thrown by the JVM using
6.
▲
by
airspeedswift
1y ago
> The big performance hit in Swift would come in method dispatch where it’s following Objective C strategies which would result in indirect calls for object methods. While Swift can use Objective-C's message sending to communicate
7.
▲
by
airspeedswift
1y ago
Swift, Rust, and C++ all share the same underlying techniques for implementing zero-cost abstrations (primarily, fully-specialized generics). The distinction in Swift's case is that generics can also be executed without specialization
8.
▲
by
airspeedswift
2y ago
You can read about the trade-offs in the language proposal here: https://github.com/swiftlang/swift-evolution/blob/main/propo... In particular: > Even with the introduction of typed throws into Swift,
9.
▲
by
airspeedswift
2y ago
you might find https://www.swift.org/documentation/articles/zero-to-swift-n... useful
10.
▲
by
airspeedswift
2y ago
Been there since 2.0. You can combine it with pattern matching to do some fun stuff: https://gist.github.com/airspeedswift/6e0c037ad5dd1b763d353f...