News for hackers. Stuff that matters.
Re:Android’s Commitment to Kotlin by blibble on Saturday December 07, 2019 @01:29AM (#21728845)
no UI toolkit I've used has anything nearly as complicated or error prone

it was designed for phones with 4mb of memory that need to serialise their entire state everytime a form (activity) disappears because they don't have enough memory and google were too lazy to implement it in the OS

as a result you need to implement masses of error prone boilerplate crap for each and every activity, and nearly everyone gets it wrong in subtle ways

rotate your screen? better implement that serialisation perfectly else the user will lose state when they rotate their device

a lot of apps just disable features like rotation, because they're too time consuming to implement (and a nightmare to test)

Re:Android’s Commitment to Kotlin by ShamelessC on Saturday December 07, 2019 @03:16AM (#21729126)
I've never understood why rotating the app resets the state like this without writing code to handle it. I mean even a lightweight website can change its interface on rotation using only CSS without losing any state. It's been several years since I messed with Android development. I assumed it would be fixed by now.
Re:Android’s Commitment to Kotlin by izacus on Saturday December 07, 2019 @04:57AM (#21729410)
Because the alternative is not resetting the state and having to deal with the fallout. iOS does this and it's a source of even more strange bugs and side issues (based on doing cross-platform development across several teams).

This even led to the point where a huge amount of iOS apps simply banned rotation support to not deal with it.

It's just a different tradeoff. The underlying issue is that developers don't want to deal with storing the state which causes issues on lower end devices, which start to break as users multitask. The Android tools for that also aren't all that great - although I also haven't really seen any other toolkit do it better.

Re:Android’s Commitment to Kotlin by cerberusss on Saturday December 07, 2019 @06:30AM (#21729710)
I'm an iOS developer and I'm not sure what you mean. Auto Layout provides enough hooks to take care of rotation. Why would rotation be a source of strange bugs and side issues?
Re:Android’s Commitment to Kotlin by izacus on Saturday December 07, 2019 @09:42AM (#21730484)
Because not all the state and layout is handled by AutoLayout... and it has its own set of bugs. Heck, iOS apps themselves (iMessage, Springboard) and riddled with rotational layout bugs in iOS 12 and 13.
Re:Android’s Commitment to Kotlin by cerberusss on Saturday December 07, 2019 @09:57AM (#21730565)
But how bad is it, I mean how many have you encountered so far? I don't doubt it, but in my years of iOS development, I haven't seen them.
Re:Android’s Commitment to Kotlin by jinushaun on Saturday December 07, 2019 @05:47AM (#21729555)
Because web has “unlimited” memory. Mobile devices don’t, especially if you have an OS that aggressively kills apps to maintain decent battery life.

That said, I agree. Rotation should not be conflated with general app suspension. They are two different concerns. iOS does this.

Re:Android’s Commitment to Kotlin by pjmlp on Saturday December 07, 2019 @08:27AM (#21730170)
And Symbian did as well.
Re:Android’s Commitment to Kotlin by jabot on Saturday December 07, 2019 @03:23AM (#21729146)
Maybe that's because the website already has a serialized state - the HTML?
Re:Android’s Commitment to Kotlin by izacus on Saturday December 07, 2019 @04:51AM (#21729386)
> it was designed for phones with 4mb of memory that need to serialise their entire state everytime a form (activity) disappears because they don't have enough memory and google were too lazy to implement it in the OS

This is literally how iOS and other mobile toolkits work as well.

Re:Android’s Commitment to Kotlin by pjmlp on Saturday December 07, 2019 @08:26AM (#21730168)
Windows CE and Symbian weren't as complicated and yet had even less memory to play with.