Live data from Hacker News

Kotlin Is Better

steve-yegge.blogspot.com

41–50 of 229 posts

Re: Kotlin Is Better

#41
post #18
post #10

Earlier quoted context omitted.

It's hard to pass objects like that because it's a terrible idea. If you can't serialize the object then your state isn't stored and you'll possibly lose that object on a screen rotation and activity restart.

It's a pretty terrible design to couple activity state to the physical orientation of the device.

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.

Re: Kotlin Is Better

#42

The only problem with Steve's rant is that he starts out describing his experience with APIs, but then it turns into an issue of better languages. Presumably Kotlin doesn't wrap the entire Android API with some kind of better API, but most Android API calls would be direct Kotlin->Java calls, so how does Kotlin solve the nasty API issue? Really, this seems to be another Java critique by Steve. He's also written criti…

I was asking myself the same question, then he wrote: Kotlin manages to help you route around just about all of Android's Red Lights, and turns the experience into something that on the whole I now find superior to iOS development. I haven't done any android and don't know kotlin either, so maybe someone here who does can expand on this.

I don't know Kotlin but I have done both IOS and Android programming and they both have their plusses and minuses compared to each other. I am not a superstar programmer like Yegge, learned IOS first and Android seemed really weird coming from that background but I eventually grokked it and converted existing IOS app to Android, and next few apps we did I wrote it for Android first.

One key obstacle for me to get over is that some of the stuff one learns by attempting to learn through Google's documentation and copying their examples is pretty horrible in a non-toy app. IIRC I had to learn this the hard way by making an app and finding it getting geometrically harder in complexity when adding features one by one with image downloading async tied to activities and message passing from service to activity tied to message number/activity number.

Re: Kotlin Is Better

#43
post #22

Earlier quoted context omitted.

Oh Delphi.. every time I fight with CSS and think about how easy making GUI apps used to be almost 20(sic!) years ago, I feel like something went wrong. Mandatory: https://www.youtube.com/watch?v=8pTEmbeENF4

So did Delphi handle dynamically resizing and positioning layouts? My impression is all the old highly productive gui languages (Delphi, Visual Basic, ...) used absolute positioning. Personally I'd rather have a more complex gui framework (css, swing, wpf) that handles positioning than to be forever cursed tweaking pixel width, height, x, y values.

Yes, if you set anchors on each component you wanted to be resizable (more specifically, all four sides could have had an independent anchor).

Re: Kotlin Is Better

#44
post #22
post #19

Other language built around IDE support: Delphi. The compiler was built with callbacks to provide code completion; it runs in process, as a DLL, as part of the IDE. No accident that Hejlsberg also design C#, and innovated further with TypeScript's language server. He wrote the original Turbo Pascal (IDE + Compiler in the same executable) in assembler, so he's been building IDE + language combos all his life.

Oh Delphi.. every time I fight with CSS and think about how easy making GUI apps used to be almost 20(sic!) years ago, I feel like something went wrong. Mandatory: https://www.youtube.com/watch?v=8pTEmbeENF4

There's always Lazarus...

Re: Kotlin Is Better

#45

> And Android has some pretty big red-light APIs. Fragments, for example, are a well-known Flagship Bad API in Android. Ugh. I left Android development right around Honeycomb - where Fragments were supposed to be the cool way to manage your app and you'd get screen orientation and device screen configuration all for almost free. In practice I found Fragments far more confusing to use than the already complex Activity…

It's not so much that fragments is a bad idea as a concept. It's that its implementation is a textbook example of bad API design.

I dovt know about other people but I certainly end up cargo culting every time I want to use the fragments API.

Re: Kotlin Is Better

#46

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…

The passing of things from activity to activity does feel vaguely boilerplatey, on the other hand I have to review my colleagues' IOS code from time to time and there's always an issue with a view loading data, then loading a view on top of that with another different set of data, and so on, until the app runs out of memory that I'll have to fix by making it work like the Android app by serializing all the data when the views disappear.

We could fault the design for stacking all those views but that's another issue.

Re: Kotlin Is Better

#47
post #36
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.

I mean guys been blogging for ages and it's been like a decade so maybe his position changed or he is contradicting himself. No dog in the fight personally as I don't use any of that stuff. Maybe I am missing some deep technical blunder but on the face of it seems a bit silly to cite the guys decade old work against his current; then be surprised they aren't fluidly consistent..

It's not that there's anything wrong with someone changing their mind. I certainly thought FP was useless ten years ago, java was the best and generally had some bad ideas about software engineering. However, the difference is I had the sense to not blog about things I only had cursory knowledge of while attempting to sound like the ultimate authority on the matter...

Re: Kotlin Is Better

#48
The "ew gross weird" reaction to Scala and Clojure is tremendously disappointing (especially coming from someone whose thesis is basically "give this new language a chance")

Re: Kotlin Is Better

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

Re: Kotlin Is Better

#50
It seems to mostly be compared to Java. Sure, if you don't like functional languages or dynamic languages (Jython, Groovy, JRuby) then I guess it's the best high profile JVM language.
Post reply on HN