Live data from Hacker News

Swift is like Kotlin

nilhcem.com

161–170 of 364 posts

Re: Swift is like Kotlin

#161

Earlier quoted context omitted.

One has a top-notch IDE from a top-notch IDE vendor. The other has XCode. Also, ARC aside, for the 3-4 items you mentioned, either Kotlin also also has them, or has just as good alternatives. And none of those are life-changing. ARC vs a good GC is just a different tradeoff (no cycle detection vs pauses, etc). I'm sure you can find some things where Swift is better at, and others where Kotlin is. But not that many to…

Sure thing... When will Jetbrain have a decent interface builder? Decent instrumentation? Decent documentation viewer? Can you get an object graph with JetBrains? Xcode isn't perfect, but it's way better than JetBrains. Just because one has one feature that one doesn't have, doesn't mean that Xcode beats JetBrain's IDE all day.

Yes, yes, and yes, plus Jetbrain IDEs have much superior code assistance and navigation compared to Xcode. Xcode is clearly worse than Visual Studio, JetBrains, Eclipse, and many other IDEs I've used over the past 20 years in the industry when it comes to code navigation, refactoring, and basic editing. Xcode does only one thing well and that's interface builder, but if you were writing a backend application with no UI would you choose Xcode? I'd rank it lower than emacs and vim for editing tasks.

Re: Swift is like Kotlin

#162
post #71

Here 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.

I don't think so. The main concern for someone with anti-russian stance would be using Russian tech at all, not it's name. But I don't remember JetBrains ever doing anything to align themself with state politics and it's not like one has to buy anything from them to use Kotlin. So I don't see it as a major factor.

Re: Swift is like Kotlin

#163
post #71

Here 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.

Kotlin is just the geographic name of the island. A "military base" (Baltic fleet admiralty headquarters, which is military, but not "base") is located there, but it's location is the fortified city named Kronstadt.

I am a pro-Ukrainian Russian, and I know many Jetbrains employees, who are cool and bunch of hackers and totally apolitical. Don't worry, it is kosher. :)

Re: Swift is like Kotlin

#164

Does 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.

I agree, it leaves a bad taste in the mouth. It's even worse than old PHP's array().

I'll pick short forms all the time: lists with (), dictionaries/hashes with {}.

Re: Swift is like Kotlin

#165
Why not merge Swift and Kotlin?

Seems like they are very similar languages, with similar goals. They both want to be cross-platform. I suppose the competition is healthy, but at some point there's just a lot of duplicated effort. Although, I guess if they're both using LLVM, then it's not such a big deal. Maybe one day we'll see libraries that can be used by both Kotlin and Swift.

Re: Swift is like Kotlin

#166
post #71

Here 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.

It's bad, but the name could be worse: https://www.cockroachlabs.com

Re: Swift is like Kotlin

#167

It's strange that on the Kotlin side the author goes out of their way to show 'shorter' ways to do things that are also available in Swift but not illustrated. let sorted = [1, 3, 6].sorted() let sum = [1, 3. 6].reduce(0, +) as examples

while we're at it http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.16...

Re: Swift is like Kotlin

#168

Earlier quoted context omitted.

Would you work in a programming language called Hitler? Any multinational company needs to do their research before deciding on a name.

Hitler is universally offending and I would question the motives of its creators. OTOH, I couldn't care less if a language would be called gomix or ibne (same word in Turkish) or fag.

> Hitler is universally offending

It's not though, and there are many cultures in the world where people are so far removed from what happened that they don't have an understanding of why people would be upset about it. See:

http://kotaku.com/man-opens-nazi-cafe-baffled-that-it-pisses...

https://en.wikipedia.org/wiki/Cross_Cafe

Plus numerous other examples

Re: Swift is like Kotlin

#169

Earlier quoted context omitted.

One has a top-notch IDE from a top-notch IDE vendor. The other has XCode. Also, ARC aside, for the 3-4 items you mentioned, either Kotlin also also has them, or has just as good alternatives. And none of those are life-changing. ARC vs a good GC is just a different tradeoff (no cycle detection vs pauses, etc). I'm sure you can find some things where Swift is better at, and others where Kotlin is. But not that many to…

Sure thing... When will Jetbrain have a decent interface builder? Decent instrumentation? Decent documentation viewer? Can you get an object graph with JetBrains? Xcode isn't perfect, but it's way better than JetBrains. Just because one has one feature that one doesn't have, doesn't mean that Xcode beats JetBrain's IDE all day.

> Xcode isn't perfect, but it's way better than JetBrains.

O_o Are you kidding me?

People whinge all the time about jetbrains subscriptions, but I've literally never spoken to someone who's actually used their products and think that the alternative editors available (visual studio, xcode, etc) are actually better.

There are some features like UI designers that you can't do without, but it's been a long time since I met anyone who actually liked xcode.

Re: Swift is like Kotlin

#170
Some considerations on the syntax (Swift first, Kotlin last in each pair)

    bad: \(apples + oranges) # using \ is looking for troubles 
    good: ${apples + oranges}

    good: label + String(width) # even Ruby requires a .to_s here
    bad: label + width # surprises will follow

    good: ["Anna", "Alex", "Brian", "Jack"]
    super bad: arrayOf("Anna", "Alex", "Brian", "Jack") # make the long form optional

    good: for index in 1...5 {
    bad: for (index in 1..5) { # the useless ()

    bad: extension Double { # why do we need to be so explicit?
        var km: Double { return self * 1_000.0 }
    good: val Double.km: Double get() = this * 1000
Post reply on HN