by api · 8y ago · 0 comments
Its more like we had this window of time when pointers were not weird and got too used to it.
It's strange that we put so much effort into learning all this arcane knowledge and now we're supposed to unlearn it...
I also don’t understand a reason behind dragging all that legacy into current standards. Does a real application of it make at least 0.1% of all usage? You cannot even buy a chip that implements segments, tagged pointers, etc etc. at least they could make a special mode where you can span across symbol whatever it means or see a pointer as a cpu sees it.
All this can be solved with simple ptr_untag(p), ptr_span(expr) and similar constructs, but instead we have resort to outsmarting the specific compiler logic or introducing ourself with complicated type systems. That went insane. Personally I just want my bytes in linear address space and a way to tell which bytes point to which and which do not. I liked asm and then C, they were two of my first three languages, but what C became today is just a horrible mess.
Not only can you buy a chip that implements segments, the computer you wrote that statement on probably has such a chip.
Edit: though strictly speaking I was obviously wrong on that, clarifications are welcome.