logoalt Hacker News

Animatstoday at 2:40 AM1 replyview on HN

The real lack is that C doesn't have slices. Slices can do most of what pointers into arrays can do, with sane semantics. Slices were invented surprisingly late. They were implementable in the 1970s, but didn't really show up until the 1990s. Now that we have slices, the demand for pointers into the middle of an array has much decreased.

I had a go at retrofitting C with slices over a decade ago.[1] Too much political hassle.

[1] https://www.animats.com/papers/languages/safearraysforc43.pd...


Replies

abnercoimbretoday at 3:10 AM

Meaning it died at committee?

show 1 reply