News for hackers. Stuff that matters.
Re:Dictionary and Set Improvements in Swift 4.0 by hellofunk on Wednesday October 04, 2017 @04:28PM (#15404303)
I really wish Swift could find a way to be useful on platforms other than Apple. I'd be willing to commit more to it if I could write truly portable code in it. It's got a good start on Linux, but Windows and Android would be cool too. Though Kotlin won out over Swift for Android (very similar languages but I like Swift a bit better there).
Re:Dictionary and Set Improvements in Swift 4.0 by pjmlp on Wednesday October 04, 2017 @04:45PM (#15404453)
Any language that wishes first class support on Android needs to support a painless way to interoperate with Java APIs on their compiler toolchain.

Otherwise developers are going to have lots of pain manually writting JNI wrappers to 90% of Android APIs.

Likewise on Windows with COM support.

Re:Dictionary and Set Improvements in Swift 4.0 by Stanleyc23 on Wednesday October 04, 2017 @04:42PM (#15404437)
let's say android or windows adopted swift. I don't think that would eliminate the biggest learning curve of dealing with the frameworks. in my experience, learning UIKit stuff was way trickier than swift. I imagine the same experience developing for other OS'.
Re:Dictionary and Set Improvements in Swift 4.0 by vvanders on Wednesday October 04, 2017 @05:08PM (#15404679)
I dunno how true that is, Rust has fantastic support across Windows and Android but leaves UI framework up to the platform.
Re:Dictionary and Set Improvements in Swift 4.0 by pjmlp on Wednesday October 04, 2017 @07:40PM (#15405731)
I wish Rust had such fantastic support you claim.

There is no support for integrated debugging, across languages on Android Studio and Visual Studio.

No support for COM or UWP and Win32 is WIP.

Not sure how much NDK APIs are actually wrapped.

Re:Dictionary and Set Improvements in Swift 4.0 by vvanders on Wednesday October 04, 2017 @10:58PM (#15406437)
I hate to be a bit blunt but you're really barking up the wrong tree.

VSCode debugger works fine on both msvc and mingw targets.

Asking for COM or UWP is like saying that Javascript has a horrible interop story with COM/UWP. You're picking Rust to build something fast and/or low memory. Leave building a UI to the right tools.

C# has a fantastic FFI and works just fine with Rust. I actually have a project using UWP and Rust together. I get all the portability of Rust and get to use UWP as the UI frontend with minimal fuss.

Re:Dictionary and Set Improvements in Swift 4.0 by pjmlp on Thursday October 05, 2017 @09:55AM (#15409129)
I am just raising awareness, it is all a matter if you feel like it matters to earn the hearts of. Windows developers using to their VS, C# + C++ and respective tooling productivity.

Picking up your example,how do you expose and debug UWP components?

Re:Dictionary and Set Improvements in Swift 4.0 by Rusky on Wednesday October 04, 2017 @08:47PM (#15406022)
Those are probably what the parent means by "UI framework." The Rust toolchain does integrate seamlessly with those platforms' native toolchains, using the same binary and debug info formats.

Perhaps this is perception is just caused by e.g. the extremely low bar set by MinGW, which doesn't do any of that despite "supporting" Windows.

Re:Dictionary and Set Improvements in Swift 4.0 by pjmlp on Thursday October 05, 2017 @09:57AM (#15409146)
Those stacks are more than just UI.

For example since Longhorn failure, COM has become the major way to introduce Windows APIs, since Vista Win32 doesn't get much love.

Re:Dictionary and Set Improvements in Swift 4.0 by kobeya on Wednesday October 04, 2017 @05:33PM (#15404909)
I think that’s what he’s saying?
Re:Dictionary and Set Improvements in Swift 4.0 by vvanders on Wednesday October 04, 2017 @05:52PM (#15405039)
Sort-a. I think frameworks are a separable problem with the platform support.
Re:Dictionary and Set Improvements in Swift 4.0 by favorited on Wednesday October 04, 2017 @05:54PM (#15405051)
You can lump UI frameworks in with others, right?
Re:Dictionary and Set Improvements in Swift 4.0 by hellofunk on Wednesday October 04, 2017 @04:49PM (#15404505)
I'm talking more about portable business logic, libraries I could write and access on all platforms.
Re:Dictionary and Set Improvements in Swift 4.0 by augbot on Wednesday October 04, 2017 @10:29PM (#15406363)
https://github.com/apple/swift/blob/master/docs/Android.md

This is a good start, at least for Android hardware..

Re:Dictionary and Set Improvements in Swift 4.0 by marvel_boy on Thursday October 05, 2017 @07:59AM (#15408406)
Amazing. Thanks for the link.
Re:Dictionary and Set Improvements in Swift 4.0 by Stranger43 on Wednesday October 04, 2017 @04:54PM (#15404544)
It's probably going to end up similar to the equally hyped objectiveC where the core language was made portable but few of the tooling/API's used for real world OSX applications ended up supporting anything but OSX in any production ready capacity despite GNUSTEP actually shipping a ObjetiveC/OpenSTEP clone for Linux.

For the time being swift on Linux is a case of a few PaaS vendors trying to product differentiate by also offering swift frameworks because they can(due to modern container wrangling) more then due to any real market demand.

Re:Dictionary and Set Improvements in Swift 4.0 by amorde on Wednesday October 04, 2017 @06:19PM (#15405226)
One of the biggest causes of this for Objective-C was the lack of the Foundation framework (a higher-level interface to Core Foundation) - but this is being reimplemented in Swift. See https://github.com/apple/swift-corelibs-foundation

Of course UIKit will still be missing, but thats sort of expected.

Re:Dictionary and Set Improvements in Swift 4.0 by favorited on Wednesday October 04, 2017 @09:35PM (#15406193)
Not if Microsoft keeps this up: https://github.com/Microsoft/WinObjC/tree/develop/Frameworks...

I'm not saying that's entirely reasonable, but it exists.

Re:Dictionary and Set Improvements in Swift 4.0 by nerdface on Wednesday October 04, 2017 @05:48PM (#15405012)
Re:Dictionary and Set Improvements in Swift 4.0 by Someone on Wednesday October 04, 2017 @06:58PM (#15405474)
https://github.com/apple/swift/blob/master/README.md:

”macOS, Ubuntu Linux LTS, and the latest Ubuntu Linux release are the current supported host development operating systems”

Also, on the page you reference:

”Note that all compiled Swift binaries are only executable within Bash on Windows and are Ubuntu, not Windows, executables.”

Re:Dictionary and Set Improvements in Swift 4.0 by favorited on Wednesday October 04, 2017 @09:49PM (#15406232)
> macOS, Ubuntu Linux LTS, and the latest Ubuntu Linux are the current supported host development operating systems

I believe that "supported" here means the test suites and CI are run on those platforms. More importantly, any regressions on those platforms would be considered bugs. However, there have been partial or complete ports to several other platforms, including some weird ones.

Aside from Apple platforms, I see code in-tree for Linux, CYGWIN, Windows, FreeBSD, PS4[0], Android, and Haiku[1] (a revived BeOS). And that's not some stray LLVM code, it's in the Swift compiler itself. I've read that there was/is an out-of-tree upstream port to some IBM mainframe hardware, as well.

A bit tangential to your original point, but I think it's interesting.

[0]https://github.com/apple/swift/commit/83901998c91f9242a133aa... [1]https://github.com/apple/swift/commit/aee81d272f3147c0a9b610...