The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Presumably it's to make it absolutely obvious that you wanted the app to crash when it was null!
"Nope, this wasn't no accident. I hate my users."
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
Avoid using the !! assertion in Kotlin - it is generally not recommended because you are bypassing the compiler safety rules.
From the compiler's point of view, if something is nullable - even if you know it currently is not null - you need to cover for the possibility that it may be null when it is referenced.
What is recommended is something like this:
do something with foo
This tells the compiler that when foo(which is nullable) is not null you want to "do something with foo".
...and there's lots in Kotlin that I found and still at times find difficult having come from a C# .NET background.
“That which can be asserted without evidence, can be dismissed without evidence.”
I have a header file that is just tables of possible/must/must-not break actions depending on character combinations.
This is due to Unicode Standard Annex 14 and Unicode Standard Annex 29. Presumably because the committee hadn't made things difficult enough already, they decided to turn line breaking into a Rube Goldberg contraption.
I'm sure they have reasons for all of this, and if they could corner me in a dark alley they'd explain them to me at length, but at the end of the day coding against the Unicode standards is like flossing a cat - everybody ends up unhappy and someone might be going to the emergency room.
Worse than Vogons: Humans trying to defined rules for the royal mess other humans managed to create over many years.
You can choose only supporting English. Or do Chinese - even simpler.
Once you want to support multiple languages you end up in the mess. And don't expect you can do proper line-breaks without knowing the language of the UI. A Chinese text with an English word in it (for example a company name) should use Chinese line-break rules inside the English word. I would expect you can put western languages into the same rule set (as long as you respect non-breakable space etc) without too many problems.
So you want to do a Dutch accent. I get it, it's a funny accent to make fun of. But there is one feature that Dutch doesn't have: sh everywhere. That's a rare sound in Dutch. It mainly exists English loan words, that's right, you are the ones saying sh. In actual Dutch words, there are some rare cases where an s-j combo can assimilate into the sh sound (such as the name Sjaak) but that's not a phoneme.
"But I hear you guys saying that sh sound" you might say. You're not hearing it. What you're hearing is a retracted s, which has a lower pitch, but it doesn't really have that "shushing" sound of an sh. It's not produced by blowing air between the tongue and the roof of the mouth, so it's not an sh. Only the tip of the tongue should go up, near the alveolar ridge. Go practice, or use a regular plain old English s, but sh sounds extremely non-Dutch.