@LouisDionne What do you think of evolving future C++ syntax and semantics so that types literally are values, templates are constexpr functions returning types, and there’s a uniform syntax for both? In other words, extend Hana’s type-value bijection into an equivalence.
-
-
Replying to @TimSweeneyEpic
Interesting idea. Are you thinking about additive changes to the language or breaking changes? We plan to achieve some of it by allowing you to lift types into values that can be used in constexpr. If we can lift templates too, then I think we have what you're talking about.
1 reply 0 retweets 1 like -
Replying to @LouisDionne
I’d like to see syntactic breakage without semantic breakage, such that large codebases can be auto-updated. Much of the complexity of the language now comes from now-unnecessary divergence between type syntax and value syntax.
2 replies 0 retweets 1 like -
Replying to @TimSweeneyEpic
The problem with breaking changes is that some users of C++ can't update their sources automatically, or doing so is costly (e.g. they have to go through a validation process). This is one of the reasons why we are very careful about backwards compatibility of all kinds in C++.
1 reply 0 retweets 1 like -
Replying to @LouisDionne @TimSweeneyEpic
However, like I said, we are working on additive changes that will allow doing all of Hana's type-level computations (the MPL subset) within constexpr, using normal C++ syntax. Re: the Fusion subset, I think it can be implemented efficiently on top of the type-level subset.
1 reply 0 retweets 1 like
Agree on it not being feasible to break old programs wholesale in the short term. What about one semantics with two distinct syntaxes? The new could be vastly simpler than old - context free and LL(k) - thus not add much burden.
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.