whitefusionhq / swift-for-ruby-and-js-devs

Some example code files in Ruby, Javascript (ES6), and Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swift for Ruby and JS Developers

Some example code files that implement the same functionality in Ruby, Javascript (ES6), and Swift.

(Supports this presentation which you can see for context.)

There are three different examples: Basic, Objects, and Mixins. If you execute all 3 examples in the different languages, the output should be virtually identical.

Requirements

Ruby examples require at least Ruby 2.0

Javascript examples require at least ES6 (the most recent versions of Safari or Chrome should suffice).

Swift examples require Swift 3 (provided by the latest versions of XCode). You can run the .swift files directly or load the full playground up in XCode and run that.

One cool way to run all the different examples is to use the Script add-on package for the Atom code editor.

Contributions

Some of these examples are pretty basic/silly, so I'd love to see some additional/better examples added so we can have a really solid set of comparisons between Swift, Ruby, and JS. I welcome all pull requests and feedback!

–Jared White
Whitefusion

About

Some example code files in Ruby, Javascript (ES6), and Swift

License:MIT License


Languages

Language:Swift 37.6%Language:JavaScript 33.2%Language:Ruby 29.2%