Live data from Hacker News

Swift is like Kotlin

nilhcem.com

91–100 of 364 posts

Re: Swift is like Kotlin

#91
post #12

Earlier quoted context omitted.

It confused me as well. "0.. is less than count"?

Personally, I find that just having "0..count" requires a bit of thinking on my part trying to decide if it's inclusive or not. "0..<count" instantly tells me that it's not including value, and follows the matematical interval notification [0..count] vs [0..count)

I'd prefer 0..count or 0..(count - 1) then.

Re: Swift is like Kotlin

#92
post #9

Earlier quoted context omitted.

It confused me as well. "0.. is less than count"?

".." has a meaning – why are you leaving it out of the translation?

I'd usually use ".." in the context of e.g. "2..3" to express a range but "<" to express a condition so I don't find it natural.

Re: Swift is like Kotlin

#93
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.

That's sick. Kotlin is an island. The fortress is named Kronstadt.

Re: Swift is like Kotlin

#94
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.

Can we leave the political bullshit to the media, this is simply stupid.

Re: Swift is like Kotlin

#95
post #89

Earlier quoted context omitted.

If they open source it, maybe someone should fork it called Kiev.

Ironically, the name "Kiev" would be no less offensive becuase this spelling of the name implies that this is a Russian city, not a Ukrainian one. The official and correct spelling is "Kyiv", see http://kyiv.of-cour.se/ for explanations why.

Ironically, the name "Kyiv" would also be no less offensive since it is written in Latin characters non native to Ukraine instead of the Ukrainian alphabet, which is a derivative of the Cyrillic alphabet. The official and correct spelling is "Київ"

Re: Swift is like Kotlin

#98
post #89

Earlier quoted context omitted.

If they open source it, maybe someone should fork it called Kiev.

Ironically, the name "Kiev" would be no less offensive becuase this spelling of the name implies that this is a Russian city, not a Ukrainian one. The official and correct spelling is "Kyiv", see http://kyiv.of-cour.se/ for explanations why.

Ironically Ukrainian and Russian languages are so close to each other that you can say than Ukrainian and Russian people must be related - some kind of distant cousines. Yet there is a war between them...

Re: Swift is like Kotlin

#99
post #40
post #6

I like swift's conditionals without brackets, OTOH the syntax for string interpolation is ugly

Ugh, I know it's something that literally every programmer on earth can and often does bikeshed, but Swift just got string interpolation syntax wrong . Parentheses are something that are often part of the interpolated expression... they shouldn't be part of the interpolation syntax itself.

It's so pretty but that's really disappointing. That puts a damper on even trying it but to be fair it could be a lot worse.

Re: Swift is like Kotlin

#100
post #3

Earlier quoted context omitted.

What do you like about it? I was actually thinking the opposite... EDIT: Genuinely curious, this is not meant to troll or start a war. I like the more explicit feeling `count-1`. I'd use either...

How is the inclusive range operator implemented in Kotlin? Something like `for (i in 0..count)` needs to iterate count + 1 times, which may overflow the size of count's type - annoying to implement.

I don't see where the overflow would come into play since count is the terminal value and count is necessarily representable in its type.
Post reply on HN