Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>Gravity syntax is designed to be familiar to people coming from C-like languages like Javascript, Swift, C++, C# and many more. We started working on this new language a year before Apple announced Swift and we were happily surprised to discovered how similar both syntax appear.

Amusing how the language looks so much like Kotlin - a language released in 2011 and 3 years before Swift.



> syntax is designed to be familiar to people coming from C-like languages like Javascript, Swift, C++, C# and many more

Besides Kotlin, other such modern C-like languages are Java, Dart, Go, and Groovy. But because Gravity is dynamically typed, a better peer language comparison would be Javascript, Groovy, Dart, and Swift. Each of those languages was designed for a specific platform, i.e:

  * Javascript for the web in 1995

  * Apache Groovy for the JVM in 2003 (still used for Gradle build scripts)

  * Dart for the JVM and for Javascript (and more latterly for Fucshia, Android, and iOS) in 2011

  * Swift for iOS in 2014
It's good to see modern dynamically typed languages reject Python's indentation and Ruby's `end` keyword, and settle around curly braces for scoping.


Dart has always had optional static types. With 2.0, those be come mandatory. If you are familiar with Swift, then dart would be Swift with a GC rather than ref counting and without tuples (or rather, the reverse would be true as dart is older than Swift).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: