Ranges
Ali Çehreli
acehreli at yahoo.com
Sun Aug 7 21:57:50 UTC 2022
On 8/7/22 08:34, pascal111 wrote:
> Everyone knows that slices are not pointers
D's slices are "fat pointers": In D's case, that translates to a pointer
plus length.
> that pointers are real work,
Agreed. Pointers are fundamental features of CPUs.
> but slices are like a simple un-deep technique that is appropriate for
> beginners,
That is not correct. Slices are designed by a C expert to prevent
horrible bugs caused by C experts. Most C experts use slices very happily.
> but after that in advanced level in programming, we should
> use pointers to do same tasks we were doing with slices (the easy way of
> beginners).
That is an old thought. Today, we see that no matter how experienced,
every person needs and appreciates help to prevent bugs. There are many
cases of bugs killing people, jeopardizing expensive projects, loss of
personal information, etc.
Ali
More information about the Digitalmars-d-learn
mailing list