Live data from Hacker News

Swift is like Kotlin

nilhcem.com

201–210 of 364 posts

Re: Swift is like Kotlin

#201
post #181

Earlier quoted context omitted.

Point taken, but the original point was being associated with the name, not throwing a fit. Having it on your CV/resume, for example. Potentially alienating clients because of words that stand out from the page in the wrong context. I can see a problem.

The point I responded to was maybe we should be above politics in names, to at least be capable of treating names with a professional indifference. To that end there's a simple test to see if someone you're considering working with believes that too. (Of course it's fully reversible, maybe the future will require passionate condemnation of names that might give offense in order to get hired.) For your point of unsavo…

> Of course it's fully reversible, maybe the future will require passionate condemnation of names that might give offense in order to get hired.

Pretty sure we're already at that point, for some industries/professions. Anything in tertiary education, certainly.

Re: Swift is like Kotlin

#202

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.

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?

Re: Swift is like Kotlin

#203

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: fo…

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

About \, yes it's the possible clash with a real quote. More an inconvenience to the reader that a source of bugs, but also that.

About ranges, Ruby has both .. and ... and after 12 years I don't remember which is what. Maybe an inclusive one is enough and 1..(n-1)

About syntax in general, it should be easy for developers no matter how hard it is for the compiler/interpreter to parse it. I don't like to have to type useless characters. Hence the () around if conditions and this extension thing. What else can it be? I'm defining a method of a class, no need for a special block. But I don't understand your "has to be repeated for every addition" so maybe I'm missing something important here.

Re: Swift is like Kotlin

#204

Earlier quoted context omitted.

> Here in Ukraine it would be very hard to get adoption of a programming language that is named after a Russian military base. This sounds really stupid, considering that many Ukrainian programmers are already using JetBrains products and that punishing a great company for the actions of politicians is kind of sad.

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

[deleted]

Re: Swift is like Kotlin

#205
post #85
post #36

Earlier quoted context omitted.

I prefer explicit words over symbols, like in Scala: scala> 1 to 3 scala.collection.immutable.Range.Inclusive = Range(1, 2, 3) scala> 1 until 3 scala.collection.immutable.Range = Range(1, 2)

As someone who's never programmed in Scala, it's not intuitive to me at all that "until" means exclusive, given that "to" (which is basically a synonym) means inclusive.

How would you feel about

  > 1 through 3
  # [1, 2, 3]

  > 1 until 3 # or 1 to 3
  # [1, 2]
as explicit word range notation?

Re: Swift is like Kotlin

#206

Earlier quoted context omitted.

> Here in Ukraine it would be very hard to get adoption of a programming language that is named after a Russian military base. This sounds really stupid, considering that many Ukrainian programmers are already using JetBrains products and that punishing a great company for the actions of politicians is kind of sad.

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

Yes I would.

I have a friend who's called, quite lovingly so, Hitler in our circle. The nick has nothing to do with any of his beliefs or opinions (we wouldn't be friends if it did). The icing on the cake is my kids talking about "uncle Hitler", that's just laugh-your-way-to-coma material.

Re: Swift is like Kotlin

#207

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.

> Does anyone else think the Kotlin syntax for array literals is super ugly: Well yeah, except it's really that Kotlin does not have array literals at all, arrayOf is just a variable-arity function.

I guess they think they are cool for being able to provide this feature through a library function rather than a language construct, but someone should tell them they really need to add some syntactic sugar that transparently invokes arrayOf while looking nicer.

Re: Swift is like Kotlin

#208

Earlier quoted context omitted.

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…

I tried AppCode to write in objc on mac and it felt way less transparent and smooth than Xcode. Idk if Xcode is missing some features, but all my real issues probably exist in different planes. My Xcode inconvenience points are: case-insensitive completion sometimes gets in my way, as it is with single lettered variables; it is easy to break constraints for non-trivial xib. I can live with both. What is it for you, in short?

Re: Swift is like Kotlin

#209

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.

What does the name of an individual have to do with that of an island? Wayland: I think it's the name of some America place. Should afghans, syrians, viets, [put whatever country the US invaded] stick to X11 because of this?

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.

Re: Swift is like Kotlin

#210

Earlier quoted context omitted.

It's named after an island, don't see why it's reasonable.

Whereas it's completely reasonable to object against naming something after an insect?

Yes, it is pretty normal to have phobia of e.g. insects. If you have phobia of Russia on the other hand, you might want to get checked.
Post reply on HN