"All these new languages with C-derived syntax and automatic memory management are pretty much the same -- so pick the one that is most supported on your target platform, get to work, and don't worry about it."
I'm kind of expecting someone to do a "Meta-Kotlin" next: a language that has the common intersection of features from Swift, Kotlin, C# and TypeScript, and offers tidy code generation for any of these.
Curious how they would relate all the features Go lacks.
const x = 1
val x = 1
var x = 2
It's unfortunate each language has a different keyword for constants and variables.
Scala has it too indeed, but it's not the default mode and feels awkward, also has known limitations.
The nice thing with typescript is that structural typing makes sense for 90% of the use cases, and for the remaining 10%, you can very easily simulate nominal typing by adding a field like so:
interface Robot { __Robot: true }
I would much prefer if they just added a new keyword to the language, instead of hacks like this.
This is one of the more annoying problems with our industry. People rediscover solutions from 60s and 70s and sell them as if they were new and revolutionary...
name: string;
constructor(name: string) {
this.name = name
}
You don't have to do this in TypeScript either, you can just do constructor(public name: string) { }
Also, the "Empty collections" section doesn't do the same thing, the collections you created in Kotlin are immutable.And the TypeScript ones have the value `undefined` (unfortunate that strictNullChecks doesn't catch things like that https://github.com/Microsoft/TypeScript/issues/8476).
And for some nitpicking, please be consistent with your semicolons, either use them or don't use them, but don't mix it randomly like that.
Kotlin is like TypeScript
that infer
TypeScript is like Swift
am I getting right? or Is there anything else?
Is go like scala?
Everything is C (or lisp).