On Tue, Feb 18, 2020 at 12:09 PM <kloste...@gmail.com> wrote: > > Regarding pointers: For me, point number 2 (and 3) is the key that forces us > having some way of expressing emptiness in a pointer.
I'd say that nil pointers are not really special. It's just a sentinel value. And we definitely need some sentinel value to mark the end of a linked list, for example. If a language gets rid of nil/null sentinels, it has to chose some other sentinel value for marking the .next field as not being actually a next item in the list. So it does not really solve much, if anything at all. And it enables completely new bugs to exists in exchange for avoiding the nil/null pointer dereference exception. Additionally it loses the nice and cheap HW support for detecting of using the sentinel value on most CPUs. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-WGNk5_QOzR75-AjQ65QU4Pn%3Dr9ixxSLHjcu5B7jwNQSQ%40mail.gmail.com.