Skip to content
This repository has been archived by the owner on Mar 23, 2020. It is now read-only.

"Are There Variant Types?" meaning is unclear #127

Open
WalkerCodeRanger opened this issue Jan 25, 2019 · 1 comment
Open

"Are There Variant Types?" meaning is unclear #127

WalkerCodeRanger opened this issue Jan 25, 2019 · 1 comment

Comments

@WalkerCodeRanger
Copy link

There is a slide:

## Are There Variant Types?
No, not at the moment!

It isn't clear what this is supposed to mean. Most people think of variant types as tagged union types which is what Rust enums are. This slide needs clarified or there needs to be some guide to the presenter of what this is talking about.

@skade
Copy link
Collaborator

skade commented Feb 13, 2019

Hi, sorry for the late reply.

The problem here is that

impl<T> Foo for Option::Some(T) {
   fn ....
}

(So, that every variant in itself is a type)

doesn't exist. There's multiple proposals for that, but it currently doesn't. Thanks for calling that out, the slide was quickly added after that questions became quite frequent in courses.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants