frunk icon indicating copy to clipboard operation
frunk copied to clipboard

Getting rid of `CNil`

Open Centril opened this issue 7 years ago • 4 comments

This is a follow up issue to #93.

I think we should get rid of special uninhabited types unless we have a particularly good reason to keep them. The standard library is in the process of getting rid of Infallible and other uninhabited types.

So I think we should replace CNil and Here with just !.

Thoughts?

Centril avatar Mar 21 '18 16:03 Centril

Please do not replace Here with ! because I plan to turn it into a unit struct. (for reified indices)

ExpHP avatar Mar 21 '18 22:03 ExpHP

@ExpHP Ah right; sounds like a good idea =)

Centril avatar Mar 22 '18 10:03 Centril

Interesting; I guess the empty enum trick has fallen out of fashion :)

Here aside, should we wait until ! as a type is stabilised before going ahead with getting rid of CNil? I'm not fully sure if it's done yet because these are still open

  • https://github.com/rust-lang/rust/issues/35121#issuecomment-366372239
  • https://github.com/rust-lang/rust/issues/48950

lloydmeta avatar Mar 22 '18 11:03 lloydmeta

Yeah, I think we should wait until it is stabilised.

Centril avatar Mar 22 '18 11:03 Centril