Why Nostr? What is Njump?
2025-02-13 17:40:14
in reply to

Dave Copeland :ruby: on Nostr: nprofile1q…szr50 Yeah, the idea of "return nil if the arg is nil” is to contain ...

Yeah, the idea of "return nil if the arg is nil” is to contain nils and not let them leak into object state, i.e. if a header is a name and a value, the name should never be nil, thus no Header should ever be created with a nil name.

Depending on context, "return nil" could also be "blow up”, but same general structure works.

It would be cool if Ruby allowed TypeName(…) to be auto-defined as a conversion for types you define.
Author Public Key
npub1p2v0e36yqzyk6697anan9k3rp3jkmdhu026rcs3gka64xa7jjneq5cjyrl