Hacker Newsnew | past | comments | ask | show | jobs | submit | fyve's commentslogin

CharSequence?.isNullOrBlank()

In java I can make my own static function

isNullOrBlank(String input)

Which works on nulls too, right?

It's annoying to have to reference another class - but otherwise it's not much less ergonomic.


You can, you can even call the kotlin version that way if it happens to be on the classpath, but it's truly horrible ergonomics if for every call you have to guess between class-ref-otherargs and ref-otherargs forms. It's one of those little cuts you grow numb to.


CharSequence is the base class that things like java.lang.String inherit. So I understood that as an instance method you can call like "foo".isNullOrBlank() (in Kotlin syntax)


Does this mean that you're rendering at 1fps, 10fps or something?

Is it an artificial limit you put on rendering?

Do you have button animations at 30 FPS?


All I meant is, if drawing too many things overloads the system so it can't render at 30fps, that's fine, I build things that don't look bad if the rate drops. I can't do action games, high-speed video, a few other things. That's fine, I can still do lots of things.


You can lower the frame rate when the window is not focused, or entirely avoid drawing if it's not visible.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: