I have a validation routine that has a few differe...
# announcements
I have a validation routine that has a few different steps (thing must be X long, prefix before the '-' must be Y long, prefix must conform to this mask, etc). Is there a more Kotlin-y way to do this besides a bunch of
if(!validateLength(thingy)) if(!validatePrefixLength())
folks worry so much about doing things “kotlin-ey” — really you should just strive to be clear, concise, and expressive in your code
☝️ 1
💯 1
see what conditions you can consolidate into common code paths and combine them, don’t stress about the ones you can’t. use
if appropriate/possible
also check out #codereview if you have a code snippet to share (and be sure to use an actual Slack Snippet if it’s kinda long https://slack.com/help/articles/204145658-Create-a-snippet)
fair enough. thanks
👍 1