
Perfect – Server-Side Swift - clarle
http://perfect.org/
======
ruddct
Swift, especially with its recent developments, is a hugely promising language
for building servers. Type safety? Check, with great type inference. Like
functional programming? Functions are first class citizens. Immutable data
structures? Available and always encouraged. OO? Classes are there. Structs,
kickass enums and interfaces? Fine by Swift. Predictable memory management?
Check, ARC rocks. Plus lots of nice language features like guard, do/try,
optionals, etc.

Really the only thing that's missing as a language feature is some kind of
concurrency support, though I'm hopeful future iterations will include this.
In the mean time, it might be a bit of a blocker for serious server-side
adoption.

~~~
supster
Agreed server side swift will be awesome. My only complaint is that JSON
parsing is kind of a major pain. Libraries like Argo and SwiftyJSON help, but
code can still get really verbose.

~~~
tcdent
Isn't that a problem with most typed languages? You're bringing in untyped
data, so native types need to be spelled-out somewhere.

There's a line somewhere between excessive verbosity and dumb trust (like the
YAML snafu). I haven't seen great syntax yet, though.

~~~
rjbwork
Newtonsoft.Json with dynamics is really good at it in the .NET world. I
usually use actual typed objects, but the DLR has enabled some cool stuff
concerning dynamic input type things.

------
Doctor_Fegg
> Websites need servers to harness and share data. The languages that were
> developed to do this (PHP, Python, Rails, etc.)

Common misconception perhaps, but the _language_ is called Ruby, not Rails...

------
nateabele
> What is Perfect?

> [Hype] [Hype] [Hype] [Hype] [Hype]

> Features

> \- JSON encoding and decoding

Okay! Well, moving on.

------
Albright
I'm excited about the idea of server-side Swift and this seems to be the most
ambitious implementation of it so far, but who is this awful web site targeted
to? Developers? With its fading and sliding? Really?

Just give us the information without all the wank, please.

------
zmanian
I'm intensely looking forward to Swift for Linux. I'd love to contribute more
to open source iOS targeted project but I'm really unwilling to learn
languages that I can't use on Linux at all because I don't want to make a Mac
my daily driver.

------
mahyarm
I would of done Swift with Sails. It would of been a great pun on Ruby on
Rails.

~~~
benbayard
Sails is a library already for Node. (that doesn't invalidate your name, I
just thought I would let you know if you didn't already).

------
11thEarlOfMar
I'd like to hear from Swift Devs who also need to support Android. What does
the landscape for cross development look like today, and what is the
prognosis? Is open source Swift going to lead to a truly cross-platform tool
set any time soon?

~~~
SneakerXZ
You don't have many choices for cross-platform tools. You can either use C++
that is quite hard for a lot of people but I would say most popular and most
stable. You can use C# or Java with Xamarin but it is very expensive, unstable
and it is kind vendor lock-in. You can also use JavaScript but you will lose a
lot of performance that is very important on mobile. There are other options
like using Lua, RubyMotion but they suffer same problems as JavaScript

Bottom line: There isn't convenient, modern, fast, open-source method for
cross-platform development.

Swift bridges nicely with C and it is built on LLVM so you will be able to use
it on Android with Android NDK and bridge it through JNI and Microsoft
recently also adopted LLVM so you will be also able to use it there.

~~~
smt88
> _You can also use JavaScript but you will lose a lot of performance that is
> very important on mobile._

I've used Appcelerator Titanium fairly extensively. The performance difference
vs. native code is undiscernible. Unfortunately, JavaScript is an awful
language to use, so there are tradeoffs. Maybe Titanium + TypeScript would be
the sweet spot.

~~~
Einherji
I've had the complete opposite experience with Titanium, to the point where it
was completely unusable.

~~~
smt88
I found some things about it to be frustrating and buggy, but it was still
less work than writing two different apps. My code was about 90% shared
between devices.

------
dplgk
An obnoxious name but nice work securing the domain.

------
earlz
Meanwhile, I'm still waiting on Apple to keep their promise of open sourcing
Swift "by the end of the year"

~~~
erydo
Chris Lattner did comment less than a month ago they were still on track:
[https://www.reddit.com/r/swift/comments/3q2zqa/when_is_swift...](https://www.reddit.com/r/swift/comments/3q2zqa/when_is_swift_going_open_source/cwbu0be)

    
    
      > We are still on track to open source Swift (including Linux support)
      > "by the end of 2015" as promised, more details will come
      > out when they can.
      > -Chris

------
phaedryx
One language to rule them all. One language to find them. One language to
bring them all, and in the darkness bind them?

~~~
phaedryx
I'm questioning their marketing message of "one language to rule them all".

This is how I complete it. I'm surprised other people don't and that I'm
getting downvoted.

