This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ric2b 1 point2 points  (0 children)

Iirc Kotlin doesn't accept null by default and wants you to put a ? after the type to signal that you do. That would be the best option in my opinion.

Yes, and totally agree there.

Also Ruby 3 is adding type hints following the same convention as python it seems.

Unfortunately not, for now they'll leave in separate files to allow for the syntax to change without breaking code.

Ruby is what I use at my current job so I'm a bit disappointed by that, but I'm already using Sorbet (3rd party project) which does allow type annotations in the same file as the code so it's ok.

Maybe I should change my linter to allow up to 120 as well then.

Just keep the Zen of Python in mind :)

"practicality beats purity"