Live data from Hacker News

Swift is like Kotlin

nilhcem.com

221–230 of 364 posts

Re: Swift is like Kotlin

#221
post #158

Earlier quoted context omitted.

Ukrainian here. Where did you hear that? Don't read news there anymore, they manipulate you. Ukraine introduced sanctions against russian businesses on its territory. As part of those sanctions, websites of three major russian IT companies have been blocked. That included Yandex (which is very similar to google, also has a lot of web services), and a couple of russian social networks.

I can say the same. Those services that were banned are either the most outrageous war propaganda outlets, or honeypots that gather intelligence information (imagine half of all Ukrainians communicating via a social network that is fully controlled by the enemy).

Yeah because russian military strategy is based on photos and videos teenagers share in vk.com

Re: Swift is like Kotlin

#222
post #200

Earlier quoted context omitted.

I don't know it for a fact, but this seems a response to Steve Yegge's catchy "Kotlin is better" (also on HN first page now).

In fact, it's linked from the Yegge post.

OP here - Yes I posted the link after finding it in Yegge's post. I thought it was interesting to see examples of the two languages side by side.

Re: Swift is like Kotlin

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

Anyway I have very bad news for new, I have a feeling your phone might have GLONASS in it.

Re: Swift is like Kotlin

#224

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

There's a PR that fixes one of them which was filed on December 22 of last year... Yikes.

Re: Swift is like Kotlin

#225
post #190

Past 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…

I assume Google will try to replace Java with Dart, because they have recently been focused on Flutter [1] [2] and Fuschia [2] development which are (mostly) C++ and DartLang stack. [1]: https://flutter.io/ [2]: https://github.com/flutter/ [3]: https://github.com/fuchsia-mirror

> I assume Google will try to replace Java with Dart

I would have expected this, but not after pushing Kotlin. Kotlin is shiny enough to temporarily distract the typical developer from the daily struggles with the abysmal Android API.

Kotlin and Java it will be for the next 10 years, for better or worse.

Dart is not very popular within Google itself, and Fuchsia is nothing more than a paid hobby project[0].

[0] See https://www.reddit.com/r/programming/comments/6a026o/googles... for a pretty damning review

Re: Swift is like Kotlin

#226

Earlier quoted context omitted.

Equating a programming language named after a Russian island to Hitler is a real stretch, unless you think that everything Russian is like Hitler. It's just an island and a language named after it.

maybe the appropriate US version is "Pearl Harbour" - how would you feel about a language called PearlHarbour, and can see a situation where a (non-technical) hiring manager would take issue with that appearing on your CV?

> maybe the appropriate US version is "Pearl Harbour"

That doesn't quite work—Pearl Harbor was a US base, so most Americans would be okay with it. The negative associations we have with it are what was done to it & the people who served there. We're not angry or upset about the base itself.

Re: Swift is like Kotlin

#227
post #220

Earlier quoted context omitted.

> # using \ is looking for troubles Are you referring to escaping and other special sequences (e.g. unicode codes)? Though it is odd-looking I actually find it rather smart that they decided to reuse an existing mechanism for that: aside from delimiters the only magical character in a string is \ rather than have e.g. both \ and $. > # the useless () My beef is more with 1..5 being inclusive and there apparently bein…

1..5 syntax has been deprecated for about 2 years, now you have 1...5 which is inclusive and 1..<5 which excludes the last element.

does it work with expressions? foo()...bar()? I can count on no fingers the amount of times I've hardcoded the length of a loop in production code.

Re: Swift is like Kotlin

#228
post #21

I feel like you could about as well write an article about how Go or Scala or TypeScript is like Kotlin. They all have some cases where they look similar or have some similar constructs borrowed from other sightly-less-recent languages. It doesn't seem like a very interesting or deep similarity. If you want to compare them, going over the differences would be a lot more illuminating.

Yeah, my first impression was "This is exactly like Haxe". They definitely went through some steps to make it familiar.

Re: Swift is like Kotlin

#230

Earlier quoted context omitted.

There is no line. Expression is turing complete. That you might not like something I say does not have any effect on my right to say it as a human being. Obviously the names are tongue in cheek jabs. There's no language called Auschwitz, afaik, and even if there was, it would have as much right to exist as Java or Python or whatever. You don't get to tell people what to name things just because you're offended. You g…

> You don't get to tell people what to name things just because you're offended. Sure you do, and you get to say your reasons too, refuse to adopt something based on those reasons and try to persuade other people and organizations to accept your reasons. You even get to apply mild sanctions - like not buying things from them or discouraging others from interacting with the person who did the thing that offended you.…

This, thank you. So many people seem to think that freedom of speech == freedom from consequences. The reality is that freedom of speech == freedom from government consequences.
Post reply on HN