Sonar helps you commit clean C++ code every time. With over 550 unique rules to find C++ bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work. Learn more →
Swift Alternatives
Similar projects and alternatives to swift
-
swift-evolution
This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.
-
Elixir
Elixir is a dynamic, functional language designed for building scalable and maintainable applications
-
Sonar
Write Clean C++ Code. Always.. Sonar helps you commit clean C++ code every time. With over 550 unique rules to find C++ bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.
-
-
-
-
-
zig
General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
-
InfluxDB
Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.
-
hummingbird
Hummingbird compiles trained ML models into tensor computation for faster inference.
-
-
-
swift-corelibs-foundation
The Foundation Project, providing core utilities, internationalization, and OS independence
-
-
-
-
-
TypeScript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
-
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
swift reviews and mentions
-
Adding Union to Swift with Metaprogramming
The Swift community came up with a couple of implementations of Either — a generic enum that carries one of 2 types associated with it (here, here, and here). There has been a discussion about adding Either to the Standard Library. Still, it seems we’re not going to have it in the foreseeable future because adding disjunctions (logical XORs) in type constraints is a commonly rejected evolution proposal. Funny enough, Apple has an internal implementation of Either in their standard library, but they are not sharing it with us ¯\_(ツ)_/¯
-
Swift Achieved Dynamic Linking Where Rust Couldn't
They are exactly the same except for when they're not.
(On 64-bit) Rust very naively has two 64-bit integers for the strong and weak count, Swift packs them into only one. Swift also packs in several extra flags for various things [0].
These flags mean that retain/release (increment/decrement) is actually an atomic compare-and-swap instead of a fetch-add. Allegedly performance issues with this were fixed by the hardware team, just, optimizing CASes better.
Swift also has to interop with ObjC "weak" pointers which have move constructors because their address is registered with a global map which is used to null them out when all strong counts go away, but I don't think this changes the design much when not using them.
Swift ARC is built into the language and a huge amount of the compiler's energy is dedicated to optimizing it. This is why it's part of the calling convention (+1/+0), why there are special getter/setter modes with different ARC semantics, why many stdlib functions are annotated with "this has such-and-such semantics" and so on.
Swift ARC is also very pervasive, as basic collections are all ARC-based CoW, all classes are ARC, and I think existentials and implicit boxes also go through ARC for uniformity?
ARC is also why historically Swift gave itself fairly extreme leniency on running destructors "early" based on actual use [1]. Eliminating a useless +1 can be the difference between O(n) and O(n^2) once CoW gets involved!
By contrast in Rust it's "just" a library type which you have to clone/drop (increment/decrement) manually. It doesn't do anything particularly special, but it's very predictable. The existence of borrows in Rust lets you manually do +0 semantics without having to rely on the compiler noticing the optimization opportunity, although you do need to convince the borrow checker it's correct.
[0]: https://github.com/apple/swift/blob/3b00177f768b630a8f7a1135...
[1]: https://forums.swift.org/t/a-roadmap-for-improving-swift-per...
- Why I selected Elixir and Phoenix as my main stack
-
UIKit on Windows?
Note that the screenshot you shared is from an old (and AFAICT abandoned) port of Swift based upon MinGW. You should look to https://swift.org for the official releases for Windows which are more current.
-
Apple Announces Full Swift Rewrite of the Foundation Framework
`Array` is defined in the Swift standard library, but the compiler knows about the type directly, and also recognizes various @_semantics("array.blah") annotations that appear in the standard library source code.
https://github.com/apple/swift/blob/main/stdlib/public/core/...
It's written in C++ although there is some Swift in it now [1]. The compiler doesn't depend on Foundation though.
[1] https://github.com/apple/swift/tree/main/SwiftCompilerSource...
-
Getting started with Swift-C++ interop
CppInteroperability folder in the Swift repo contains more information on interop features, limitations and plans.
-
-🎄- 2022 Day 5 Solutions -🎄-
It does exist, for RangeReplaceableCollection.
-
-🎄- 2022 Day 4 Solutions -🎄-
Good job, but ClosedRange.contains and .overlaps are in the standard library.
-
SwiftUI Is Convenient, but Slow
According to https://github.com/apple/swift/blob/6d2a3bbf9d518c2ff8c63731...
> The Swift language contains a number of features not part of the Hindley-Milner type system, including constrained polymorphic types and function overloading, which complicate the presentation and implementation somewhat. On the other hand, Swift limits the scope of type inference to a single expression or statement, for purely practical reasons: we expect that we can provide better performance and vastly better diagnostics when the problem is limited in scope.
However Hindley-Milner systems are generally linear in complexity whereas Swift's type system experiences combinatorial complexity explosions in the presence of overloads and operators and literals.
-
A note from our sponsor - Sonar
www.sonarsource.com | 3 Feb 2023
Stats
apple/swift is an open source project licensed under Apache License 2.0 which is an OSI approved license.