Explicit implicit conversions

Walter Bright newshound2 at digitalmars.com
Fri Feb 7 01:36:31 UTC 2025


On 2/5/2025 6:32 PM, Quirin Schroll wrote:
> The idea is to allow, e.g. `Type(expression)` evaluate to `expression` with a 
> static type of `Type`.

D doesn't do that because:

1. the grammar is ambiguous (confused with function calls)

2. it is not greppable

3. an "is" expression can already do that, and a template can wrap it



More information about the dip.ideas mailing list