5 ms·
> I think that if you want that, you're working with the wrong language. Maybe yes, maybe no. Walter Bright, the creator of D, has a nice article on the subjec
by hgs3 3y ago
> I think that if you want that, you're working with the wrong language.
Maybe yes, maybe no. Walter Bright, the creator of D, has a nice article on the subject [1]. I think Zig's approach which allows slices to decay to pointers and pointers+lengths to create slices is ideal. The real benefit of slices is the implicit bounds checking which some C folks might object to since one of the appeals of C is no "hidden magic".
[1] https://digitalmars.com/articles/C-biggest-mistake.html https://digitalmars.com/articles/C-biggest-mistake.html