Explicit implicit conversions
Walter Bright
newshound2 at digitalmars.com
Thu Feb 13 18:12:55 UTC 2025
On 2/6/2025 6:52 PM, Paul Backus wrote:
> In any case, the primary goal here (and with the analogous proposal for
> reinterpreting casts) is to help D programmers write correct, readable, and
> maintainable code, not to minimize the number of lines they have to type.
Spot on.
Consider:
```
const foo = @import("foo");
```
vs
```
import foo;
```
and
```
var x: i32 = 1;
comptime var y: i32 = 1;
```
vs
```
int x = 1;
enum y = 1;
```
https://ziglang.org/documentation/
More information about the dip.ideas
mailing list