4 ms·
How many times have you had the runtime exception AttributeError: 'NoneType' object has no attribute 'foo' (or its equivalent in your favourite language)?
by tome 9y ago
How many times have you had the runtime exception
AttributeError: 'NoneType' object has no attribute 'foo'
(or its equivalent in your favourite language)?
- earthtolazlo 9y agoThat's something addressed by static typing though. I'm pretty sure any dynamic language has that issue, functional or not.
- tome 9y agoIt's fair to say that the boundaries of "functional programming" are pretty amorphous and I certainly didn't mean untyped functional programming. In any case, if you want to prevent null/None errors in a way that gives the programmer his/her own access to create similar new abstractions then you need * sum types * parametric polymorphism * pattern matching at which point you may as well also add * first class functions and then if you don't describe your language as "typed functional" then how do you describe it?