Deklan Webster
06/29/2019, 11:48 PMDeklan Webster
06/29/2019, 11:48 PMcommunity is pragmatic-oriented, but isn't afraid of abstractions. people are actually building stuff.
static typing. ADTs. pattern matching with exhaustive checking. Decently strong type system: generics? No nulls: Option/Maybe.
well-developed ecosystems for backend web and desktop app GUIs
high performance. at least higher performance than Node.
if isn't garbage collected, whatever fills that role is safe but low overhead (mental and code)
good support for concurrency and parallelism
Ivan Reese
Kartik Agaram
well-developed ecosystems for backend web and desktop app GUIsThis is probably the blocking constraint. I don't know of any language that does this, unless you consider Java to support desktop GUIs or C++ to support web services.
Daniel Hines
06/30/2019, 12:43 AMKartik Agaram
Deklan Webster
06/30/2019, 12:45 AMDeklan Webster
06/30/2019, 12:46 AMDeklan Webster
06/30/2019, 12:46 AMDeklan Webster
06/30/2019, 12:46 AMKartik Agaram
Deklan Webster
06/30/2019, 12:53 AMDeklan Webster
06/30/2019, 12:53 AMDeklan Webster
06/30/2019, 12:55 AMAlan Johnson
06/30/2019, 2:28 AMnull
part. in practice, it's not a big deal. people don't use it in idiomatic Scala dependencies. unfortunately, there's currently no way to statically guarantee lack of null
in your program. it's planned for Scala 3, but we're a year away from that.Doug Moen
06/30/2019, 4:43 AMStefan
06/30/2019, 5:38 AMcommunity is pragmatic-oriented, but isn't afraid of abstractions. people are actually building stuff.Tons of apps. People are building stuff, and if you use any Apple device, you’re also likely using their stuff.
static typing. ADTs. pattern matching with exhaustive checking. Decently strong type system: generics? No nulls: Option/Maybe.Yes, all of that: https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html
well-developed ecosystems for backend web and desktop app GUIsDesktop: see App Store, AppKit, UIKit for Mac, soon SwiftUI Mobile: see App Store, UIKit, soon SwiftUI Web: https://swift.org/server/ (see projects section); web might be a little rough still, Swift does come from the native world, but the server group is making good progress quickly.
high performance. at least higher performance than Node.Don’t know about Node performance, but Swift is compiled and LLVM-based, has SIMD support, value types with copy-on-write semantics, reference types with (automatic, compiler-synthesized, deterministic) reference counting, and — although likely fast enough without dropping down to C — offers C-like unsafe APIs built-in, and easy and direct integration with C libraries. On Apple platforms several libraries exist for GPU compute, ML, and all kinds of higher-level hardware accelerated functionality. For machine learning look at Swift for TensorFlow: https://www.tensorflow.org/swift
if isn't garbage collected, whatever fills that role is safe but low overhead (mental and code)Reference counting for reference types, fully automatic synthesized by compiler with deterministic behavior. Rust-like ownership model for tighter control in the works: https://gist.github.com/Gankro/1f79fbf2a9776302a9d4c8c0097cc40e
good support for concurrency and parallelismLibraries: 1st party libDispatch (https://en.m.wikipedia.org/wiki/Grand_Central_Dispatch), NSOperation (Foundation), several 3rd party libs for promises, async/await, etc. Official async/await language support proposed: https://gist.github.com/lattner/429b9070918248274f25b714dcfc7619 Swift is the future that is here and just not evenly distributed. ;-) It doesn’t help that most people still think Swift is just an Apple thing. https://forums.swift.org/t/swift-windows/22458 https://github.com/apple/swift/blob/master/docs/Android.md
Kartik Agaram
Stefan
06/30/2019, 5:42 AMKartik Agaram
Kartik Agaram
Stefan
06/30/2019, 9:27 AMgman
06/30/2019, 10:00 AMDeklan Webster
06/30/2019, 3:41 PMStefan
06/30/2019, 3:46 PMDeklan Webster
06/30/2019, 3:47 PMDeklan Webster
06/30/2019, 3:49 PMDeklan Webster
06/30/2019, 3:49 PMStefan
06/30/2019, 3:51 PMDeklan Webster
06/30/2019, 3:59 PMDeklan Webster
06/30/2019, 4:00 PMgman
06/30/2019, 5:23 PMCan you elaborate on what you mean by “more cross-platform and inclusive”? Not a loaded question; I’m genuinely curious what Swift is missing to be perceived this way.A full tool set every bit as good the new XCode with 1st class quality GUI and graphics frameworks that runs on and/or exports to Windows, Linux, Android. 4 out 5 people or more are not on Apple hardware. I'd love to learn Swift but I can't justify iOS or MacOS only at the moment. The experience might be great but I still need to ship on either Android or Windows or both. As such I'm more likely to pick a worse language if it means I can write once or closer to once. I've shipped a 4 or 5 small electron apps. I know people have strong feelings about shipping an entire browser and the JS/HTML/CSS stack but from a productivity POV it's amazing. There are open source repos that will generate mac/windows/linux binaries and/or installers in one step. The API is 99% consistent across platforms. Yes I know it's not the native UI but for many apps it's good enough. Tons of people are using the native slack up daily and enjoying it. Even 10000s of programmers on Macs are running VSCode and loving it. Anyway, I've built small per project tools with simple forms or GUIs or graph displays. I write them on Mac send them to my clients on Windows. I'd love a better language and a better environment but who's offering one that's cross platform? The only other thing I've considered because of ease of use is Unity. It's game oriented but one click will generate an app for a myriad of platforms and I know people who have used it for non-game apps just because the cross platform story works so well. It also has various kinds of live updating Sure there are things like Qt/C++ but IIRC most of them require actually having a fully setup dev environment with tons of tools installed on every target platform. Electron is pretty much just
git clone ... && npm install && npm run dist
and everything just magically happens. It's easy to see why lots of devs opt for itgman
06/30/2019, 5:27 PMDeklan Webster
06/30/2019, 6:57 PMStefan
06/30/2019, 9:51 PMStefan
06/30/2019, 9:55 PMStefan
06/30/2019, 10:01 PMStefan
06/30/2019, 10:08 PMKartik Agaram
Deklan Webster
06/30/2019, 11:11 PMDeklan Webster
06/30/2019, 11:13 PMKartik Agaram
Deklan Webster
06/30/2019, 11:46 PMgman
07/01/2019, 5:43 AMgman
07/01/2019, 5:55 AMElectron leaves a bad taste in my mouth. I don’t like how it optimizes for developer productivity by sacrificing user experienceI feel like that is hard to quantify. Tons of people use the slack app or the discord app or VSCode and their experience doesn't seem sacrificed. Maybe I don't know what I'm missing. You can certainly make poor experiences in Electron but you can make poor experiences with any system.
Stefan
07/01/2019, 6:15 AMStefan
07/01/2019, 6:34 AMgman
07/01/2019, 9:19 AMStefan
07/01/2019, 10:05 AMDeklan Webster
07/01/2019, 2:05 PMIvan Reese
ogadaki
07/01/2019, 8:09 PMIvan Reese
Deklan Webster
07/01/2019, 8:51 PMIvan Reese
Deklan Webster
07/02/2019, 5:32 AMIvan Reese
Ivan Reese
Kartik Agaram
Kartik Agaram
Stefan
07/02/2019, 9:14 AMStefan
07/02/2019, 9:17 AMStefan
07/02/2019, 9:32 AMIvan Reese
true
for more work and false
for done.
@Stefan I misremember the term — it's "Mechanical Sympathy", and it's an existing thing, not a new coinage on my part.Kartik Agaram
Ivan Reese