Live data from Hacker News

Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa

elementscompiler.com

71–80 of 109 posts

Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa

#71
post #68
post #35

Earlier quoted context omitted.

.NET has NGEN since 1.0.

Sorry, I was imprecise. Swift was designed for the iOS platform as a replacement for Apple's dialect of Objective C. This is an unmanaged environment. There's no VM or garbage collection, although both languages support automatic reference counting. C# was designed for the CLR and has a large standard library that relies on garbage collection. It also has features permitting calls into unmanaged code, but the languag…

Except there isn't any VM when the code is AOT compiled to native code with NGEN, MDIL in Windows Phone 8, .NET Native, or in iOS.

The presence of garbage collection has nothing to do with being native or not.

Besides a language runtime and VM aren't the same thing.

Actually Swift makes use of Objective-C runtime to achieve interoperability with Objective-C libraries.

Oberon, Oberon-2, Modula-3, Component Pascal, D, Spec#, Dafny are all examples of languages that compile to native code, were used to write operating systems and use garbage collection.

Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa

#72
post #44

Earlier quoted context omitted.

Finding Swift really buggy atm - where XCode, Swift Compiler and SourceCode service routinely crashes multiple times a day for me. A lot of my time is spent sympathizing with the compiler and getting hit with hard fought lessons on what things to avoid - basically don't step too far outside the Swift Programming Guide. Apple's also glacially slow at responding to bug reports - I'm keenly waiting on the next Q/A relea…

If only this had been a language that was dogfooded to the rest of the company, we might not be dealing with these beta-like issues.

I think it was - the first app written in Swift was Apple's WWDC app. Released before they announced Swift. Though it wasn't a hugely complex app.

Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa

#73
post #61

Earlier quoted context omitted.

In fact that's exactly what it does: https://blog.mozilla.org/luke/2014/01/14/asm-js-aot-compilat...

When talking about AOT compilation, we generally tend to mean that the compiler produces a binary consisting of machine code at some unspecified time before the user attempts to run the application. In the context of that blog post, there are two compilation steps: First emscripten would be used to produce JS. Then Mozilla's JS engine would compile that JS down to machine code at runtime . They call the latter step w…

The point I was trying to get across is that by cross-compiling from C/C++ with Emscripten, static type information can be used to give native performance, that a program written directly in Javascript wouldn't. It's still AOT in that sense - it's not like JIT where only hot bits of code get converted to native to code, and only then when some heuristics have determined what actual types the code ends up dealing with at runtime.

Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa

#74
post #57

Earlier quoted context omitted.

So, the Swift compiler is slow? I mean, I expected it to be slower than Objective-C due to its dynamic nature, but that slow? Disclosure: I write Android apps, so I'm only occasionally peeking at how the iOS dev scene is developing. I've already been thinking of trying to write Android apps in Scala, but maybe this Swift to Java compiler is also worth looking at

From what I known, Kotlin or Xtend are better options than Scala, regarding execution speed of the current code generation and package size, even with ProGuard.

No, not really.

Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa

#76

Reading through the details dampened my excitement. It has proprietary extensions to the Swift language ( http://docs.elementscompiler.com/Silver/LanguageExtensions/ ) and it has differences and limitations as well. ( http://docs.elementscompiler.com/Silver/DifferencesAndLimita... ). They do however state it is free for use.

I don't have time to look, but when I signed up, I was given the option for a free trial and the option to spend $500+ depending on the package. I'll have to look closer, but I suspect this is xaraminesque.

Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa

#78
post #38
post #32

I just want to write web apps in Swift. Any news on that front?

So much this. It'd be an excellent alternative to Go, with it's nice type system and pretty advanced PL features: I'd love to write web services in Swift, but that's contingent on being able to deploy it to Linux et al.

Maybe you should check out OCaml then. It can be deployed to Linux/Windows/Mac OS X without problems, ARM devices. Offers native compilation and can even be compiled to JavaScript. The compiler is fast and freely available.

The type systems is even better and more advanced. Coming from Swift I was kinda surprised that its pattern matching was a statement and not an expression, as typical functional languages do.

Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa

#79

Reading through the details dampened my excitement. It has proprietary extensions to the Swift language ( http://docs.elementscompiler.com/Silver/LanguageExtensions/ ) and it has differences and limitations as well. ( http://docs.elementscompiler.com/Silver/DifferencesAndLimita... ). They do however state it is free for use.

I don't have time to look, but when I signed up, I was given the option for a free trial and the option to spend $500+ depending on the package. I'll have to look closer, but I suspect this is xaraminesque.

The Swift part of it is free. The C# and Oxygene parts cost, which aren't needed to develop in Swift.

Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa

#80
post #11
post #7

Apple needs to buy this company in 3, 2, 1... This is an ideal start to countering the concepts from Xamarin out of the .net camp and I would love to see them build up some form of XAML-like UI tech and tooling for x-plat UI dev so you could push the envelope on code-reuse. That would take a big dump of capital. It would also make for a push in the market for this style of x-plat dev. If you can get to the major and…

What possible reason would Apple have to buy this company?

Indeed, Swift is their way to keep developers building non-portable apps.
Post reply on HN