There does seem to be broad agreement across a range of typed languages -- TypeScript, Swift, Kotlin, ES6 + Flow -- about notations for classes, control flow and data structure declaration. But true convergence remains far away...
Is this broad agreement due to theoretical alignment, or a deliberate attempt to increase programmer adoption? If true convergence happened, there wouldn't be a need for different languages. :-)
Swift is like Kotlin
351–360 of 364 posts
Re: Swift is like Kotlin
#352Here in Ukraine it would be very hard to get adoption of a programming language that is named after a Russian military base. This is the rare case where bad naming choice really hurts. No matter how good is the language, you will have to hear and pronounce that name many times a day, and even associate yourself with it (e.g. "a Kotlin developer" in your resume). Not something to be taken lightly.
Re: Swift is like Kotlin
#353Earlier quoted context omitted.
I think it depends on more nuance than that: I do think it would be reasonable for people to avoid a language called Guantanamo because of the name associations. Wayland happens to be a place in MA but I'm from near there and even I had no idea or prior associations with that name because of the place.
Kotlin is not the military base, it is an island. Would you object to a language named "Cuba"?
I know nothing of Kotlin's specific name associations, but I don't think "it's the name of a place, therefore its fine" is valid in general. I think "Sandy Hook" would be an inappropriate name right now, while "Wayland" is fine, despite both being towns in the same general region of the world: one name invokes something specific in peoples minds and the other does not.
Its sort of like how its generally not a good idea to be named "Isis" right now, despite having plenty of harmless associations unrelated to ISIS. You might be named after the Egyption god but you are still invoking an association that you don't really want to:
https://en.wikipedia.org/wiki/Name_changes_due_to_the_Islami...
Re: Swift is like Kotlin
#354Earlier quoted context omitted.
Imagine having hundreds of languages with only trivial difference in syntax. Consider the fragmentation and effort wasted on re-inventing the same low level libraries again and again (here is the hundredth version of unit test library). Sure, only language would be bad but so is too many.
If a language has trivial difference from another language, I doubt it can gain traction. Can you cite an example?
C# and Java had what amounted to trivial differences, when they started.
Kotlin and Swift also aren't very far apart, both in terms of syntax and power (in Blub power continuum terms).
There's very Computer Science-y reasons for these languages to exist as separate languages, but they do cause of product differentiation and platform lock-in efforts.
Re: Swift is like Kotlin
#355Past the syntax similarities, both of these languages are intended replacements for an 'old' language (Objective-C => Swift, Java => Kotlin) on a dominant mobile platform, with interoperability as a major selling point (requirement?). As a mobile dev (mainly iOS) this is awesome to see and although I love me some Objective-C, working with swift has been a pleasure. Now Java on the other hand... ( shudders ). With Goo…
> both of these languages are intended replacements for an 'old' language (Objective-C => Swift, Java => Kotlin) It may be true for Swift but Google never claimed Kotlin is replacement of Java. I guess people are getting overly excited and making claims that Google did not. Kotlin is low effort developer friendly move by Google. Jetbrains will do work on language and tooling and Google would provide some Android-Kotl…
Re: Swift is like Kotlin
#356Does anyone else think the Kotlin syntax for array literals is super ugly: val shoppingList = arrayOf("catfish", "water", "tulips", "blue paint") What is wrong with square bracket syntax? (rant over). EDIT: I suppose it's consistent with other syntax e.g. listOf() etc.
In practice, it's something I stopped caring about within the first hour.
Then again, mikeash's comment pitches a more interesting idea: [] as generic collection literal syntax that depends on inference / annotation to pick a concrete implementation. Best of both worlds. I'd just remove the Array default.
Re: Swift is like Kotlin
#357Earlier quoted context omitted.
Which is actually not the case for most Ukrainians of Russian descent: Most of ethnic Russians in Ukraine signed for the Ukrainian army, fighting against Putin’s invasion, against the same Russians that came from the other side. (from http://marginalrevolution.com/marginalrevolution/2017/05/con... . Note the source is Kasparov, who is not an entirely unbiased source where Russia is concerned ;))
Well, it's a big question - what is real "ethnic" russian. It's like an "ethnic USA citizen".
It was the constitution/law that held US together as a nation instead of a shared history/culture (well, except WASP culture, which is on the wane).
Re: Swift is like Kotlin
#358Earlier quoted context omitted.
Opinionated, I suspect, but not hyperbole.
There is such a thing as a hyperbolic opinion or reaction. Not trying a language because one dislikes the syntax for one of 2000 features it has, and not even the most important one, looks hyperbolic to me.
Re: Swift is like Kotlin
#359Earlier quoted context omitted.
Kotlin has a REPL
So does Swift ( https://developer.apple.com/swift/blog/?id=18 ) ( https://repl.it/site/blog/swift )
Re: Swift is like Kotlin
#360Kotlin lacks the ability to do true functional programming that Swift has. Swift has pattern matching, recursive data structures (edit: specifically ADTs with enums or case classes is what I was thinking of here, should have written algebraic data types), tail call optimization, even some form of type classes, immutability (thanks @tmail21), and so on. Kotlin does not have any of these (edit: this is now partly false…
Maybe you haven't checked out Kotlin lately? Kotlin has somewhat pattern matching: https://kotlinlang.org/docs/reference/control-flow.html#when... Tail call optimization: https://kotlinlang.org/docs/reference/functions.html#tail-re... Type classes: https://kotlinlang.org/docs/reference/sealed-classes.html And I'm not sure what you mean by recursive data structures. Basically every C style language I'm aware of can co…