Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Null pointers are the billion dollar mistake

Name: Anonymous 2017-02-02 10:34

@davetchepak "What can C# do that F# cannot?"
NullReferenceException :-)

Educating the imperative gorillas about sum types:

https://chadaustin.me/2015/07/sum-types/

Name: Anonymous 2017-02-02 18:07

>>18
What's that article supposed to prove? That Ada and Modula-2 have sum types? C, C++, Java, C#, Python etc still do not.

Unfortunately, C compilers do not verify that the null case is always handled, and this is a particularly prevalent source of errors in C code, since there is a tendency to ignore exceptional cases.
Hahaha C is shit.

>>19
You're totally clueless, aren't you? Don't even understand what the thread is about? Tagged pointer is an implementation detail only, and yes, genius, tagged pointers are actually used in languages with sum types to implement the T + 1 types like Option or Maybe, so they bring no performance overhead.

This usage of Option to create safe nullable pointers is so common that Rust does special optimizations to make the representation of Option<Box<T>> a single pointer. Optional pointers in Rust are stored as efficiently as any other pointer type.

https://doc.rust-lang.org/std/option/

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List