@r000t @hideki I guess if you're paid on having more lines of code, but then I'd rather not work at such a place.

@hideki Unfortunately, JVM is pretty good at optimizing stuff like that. Here’s a more cursed version:

private static int stringSize(String s) { try { return 1 + stringSize(s.substring(1)); } catch (StringIndexOutOfBoundsException e) { return 0; } }

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.