Live data from Hacker News

Kotlin Is Better

steve-yegge.blogspot.com

81–90 of 229 posts

Re: Kotlin Is Better

#81
post #17

Great article. Slamming android and talking about Russian software. Click bait to boot? Sold. My only issue is with his comment on swift. Which also sucks. Objective-C is wonderful and delightful. I'm sad to see it losing favor. Oh well, off to try Kotlin. Maybe I'll finally make an android app... no.

Hello fellow Obj-C fan. I tried to teach myself Swift much like I taught myself Obj-C. It didn't feel right.

Funny how that is. Some language just click with certain developers.

Re: Kotlin Is Better

#84
post #65
post #41

Earlier quoted context omitted.

No, you don't understand. The state is serialized and stored. You might navigate away or pop into a windowed state. These things might rebuild your activity and the idea is your state should be serializable. The idea is every activity can be restarted outside of your control and your state should be fully storable.

No, I understand the Android Activity lifecycle quite well. I think it has severe flaws from a design perspective.

Not from design, no. Design is pretty sound.

It has implementation issues - you get to use a crusty ContentProvider or manually serialize everything into also crusty Bundle. Then you have that separate SharedPreferences thing. Or you can do it on your own, typically more cleanly, with an object database.

Instead it would be often fine if it just took a Java Serializable and ran with it, just call you back so that you can read all the state and redo whatever you need to redo.

Likewise IPC with Intents is pretty crusty as is with Binder, though bit less with the latter.

Re: Kotlin Is Better

#85

Earlier quoted context omitted.

> for non-static languages like Python, they're just not very good Yup. Because they can't. Without type annotations, IDE's are pretty much incapable of offering automated refactorings without human supervision (and yes, that includes Smalltalk IDE's). They can give you some primitive auto completion and navigation, but that's pretty much it.

> Yup. Because they can't. Actually they can. > incapable of offering automated refactorings without human supervision > (and yes, that includes Smalltalk IDE's) Patently false. Everyone repeat after me: automated refactoring was invented on Smalltalk with the Refactoring Browser. Again. Automated refactoring was invented on Smalltalk with the Refactoring Browser. The lack of static type information was considered a…

Automatic refactoring in dynamic languages are nowhere need to those in java. Just rename method - with static typing you know it was changed correctly everywhere, full stop. Implementation of refactoring code is easy. With javascript, you just don't know what can potentially come in as argument of function, so you don't know whether object function call can or can not be renamed.

Smalltalk authors seeing static typing as major potential problem when started years ago does not make it actual problem today.

Re: Kotlin Is Better

#86

Two thoughts. First, I also thought Android programming was horrible at first, but have since come to see it as no worse on average than iOS programming. The only really sucky thing about it IMO is the lack of ability to pass an object to another activity without serializing it (or maybe there is one I don't know about.) But since everything is done with fragments now that's moot anyway. Second, I tried Kotlin and li…

> I also thought Android programming was horrible at first, but have since come to see it as no worse on average than iOS programming

Those two statements are in no way mutually exclusive.

(That said, Swift is infinitely better than writing Android Java code, in my limited experience)

Re: Kotlin Is Better

#87
post #20

I've started to come around on a similar thought recently, after a few years avoiding static typing in python. I've been toying with C# specifically. C# with visual studio is, I think, the most productive environment I've come across in programming. It's ergonomically sound, straightforward, and the IDE protects me from all sorts of relevant errors. Steve mentioned Intellij is a bit slower than he'd hope typing somet…

> Changing one parameter or type on a class or function to refactor, and then just following the chain of compiler errors, reaching the end, and seeing that everything just works exactly how you want it to was a big eye opener to me.

Yup, "following the chain of compiler errors" mostly makes refactoring straightforward. Dynamic typing is fine when the codebase is small enough to keep it all in your head so you know what the impact of a change is. Once you've got enough code or you're not completely familiar with it, the cycle of changing the code, running it, diagnosing errors, changing the code some more while hoping you caught everything etc. becomes tedious and impractical. Simple renaming a field in JavaScript, Python or PHP is a nightmare if you want to guarantee nothing broke so I can't relate to how people don't appreciate strong typing. You're basically badly doing the job of the compiler manually by trying out all code paths yourself looking for errors.

Re: Kotlin Is Better

#88
post #7
post #3

Earlier quoted context omitted.

> whatever dumb writer You're new to this HN thing? Steve Yegge is kind well known around this here parts... Also you seem to be responding to the (meant as joke) title, not TFA.

> You're new to this HN thing? No, not really. > Steve Yegge is kind well known around this here parts... Well, I haven't noticed. > Also you seem to be responding to the (meant as joke) title, not TFA. Actually, to TFA as well. His arguments are trivial generics without much substance. Such articles irritate me greatly.

>Actually, to TFA as well. His arguments are trivial generics without much substance. Such articles irritate me greatly.

Well, it is a personal blog post and this post in particular is meant to convey personal preference (as evident by the whole semi-autobiography about his game app). The title was probably jokingly chosen to be generic on purpose (the post alludes to that in the fist paragraph).

Re: Kotlin Is Better

#89
post #16

Does anyone remember when he wrote this? http://steve-yegge.blogspot.com/2008/06/rhinos-and-tigers.ht... And in the comments section he got lit up because he was unfamiliar with Haskell/Scala/OCaml type languages... and here he is 9 years late to the party touting a baby version of these statically typed FP languages. I actually laughed out loud reading this blog post.

> and here he is 9 years late to the party Well, is he? He was talking about JavaScript on the server side even before Node.js existed, and now we see that it took off as one of the most popular platforms, surpassing Ruby on Rails.

Netscape Enterprise Server was shipping server-side JS in the 90s. I used LiveScript in a project (it could also call into JVM classes). NES was nasty to setup and configure and there were oodles of limitations, but Node.js didn't invent the idea of server side JS, it just made it practical.

Re: Kotlin Is Better

#90
post #20

I've started to come around on a similar thought recently, after a few years avoiding static typing in python. I've been toying with C# specifically. C# with visual studio is, I think, the most productive environment I've come across in programming. It's ergonomically sound, straightforward, and the IDE protects me from all sorts of relevant errors. Steve mentioned Intellij is a bit slower than he'd hope typing somet…

I just disable automatic autocomplete in IDEA and use ctrl+space explicitly when I need it. You still have all the smart functionality of the IDE, but you also get zippy typing.
Post reply on HN