@d_christiansen I wondered why you didn’t make ‘->’ into a transparent struct with two fields, hence solving the cons issue.

@d_christiansen with one more definition you can get ‘type?’ and ‘type=?’ (via ‘equal?’) for free.

@lenary
Thanks for this! Would you mind emailing them? I'm currently away from computer and highly distracted!

Though usually this kind of thing is to use as few features as possible to help as many people read the code as can, but it may be not worth the simplicity here.

@d_christiansen I was thinking further about this, only the transparent struct is enough, then just use equal?, or wrap up ensuring that both arguments are types and then use equal in type=?

Sign in to participate in the conversation
Mastodon

Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!