Ok let's try again. We've been working in integrating an small symbolic execution into rustc with @oli_obk. Yesterday we got the compiler to accept the following program: https://play.integer32.com/?version=stable&mode=debug&edition=2018&gist=0428ea00b6d256b70371bcfa06b1783a …
Actually; what *is* the difference between this and dependent types? If this would extend to arbitrary types, const expressions, then what's the difference even? :O
-
-
I'd say there are 3 differences: - We only support constants instead of any expression - You cannot write a function that returns a type. - This is "still" generics, dependent types are introduced in different ways iirc.
-
But even then, I think you can promote each value of a type to a type itself by just doing smth like `PromotedT<const Val: T>`.
End of conversation
New conversation -
-
-
This is a limited form of dependant typing
-
*nods* yeah I've heard that before. But what I'm wondering where the actual limit lies. I'm... not sure now. I guess we don't have any functions that actually operate on types, but are only able to operate on types *inside* the function parameters? At least for now.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.