Comment

Comment by krisdol

Is this different than setting a default value of nil to user?

    def print_favorite_dinosaur(user: nil)
or

    def print_favorite_dinosaur(user = nil)
Or is it effectively a different syntax for the same concept?

In either language, you still signal that the argument could be nil, and you still have to guard against it. Or so I think

parent krisdol 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton