Hacker News new | ask | show | jobs
by hanszarkov 1336 days ago
Funny stuff here, this is a long & opinionated rant against null or undefined pointer references in favor of functional. Little to do with functional programming - aside from how it handles this same construct.

> you can’t have a resistor shared by, say, both the keyboard > and the monitor’s circuitry. But programmers do this kind of > sharing all the time in their software. It’s called shared global state

Not it isn't - this is called reuse, in modern OOA&D its either inheritance or polymorphic composition. Some more modern approaches use 'mixins' and age old cross-cuts.

> Another complexity monster lurking in the software quagmire is called > a null reference, meaning that a reference to a place in memory points > to nothing at all

I recall my earliest days, using a microtec ICE to step through my code on an i960 on board and plugged into a DEC Alpha PCI slot, when the instruction pointer went to a place where there wasn't any instructions - I called it 'hyperspace' so yeah computers can actually execute bad code when I write bad code... omg - WRITE BETTER CODE, don't be constrained by the language!

>software industry has eliminated GOTO from modern higher-level languages, >software nevertheless continues to grow in complexity and fragility.

Seriously, did Scalfini quote 1970 BASIC GOTO? what about :<ref> ?

> Instead, there is a construct usually called Maybe (or Option in some languages)

Perhaps, maybe 8 years ago there was java.util.Optional ?

> founded in 1982 with a mission to help government agencies leverage technology

I think this explains some motivation

>Functional programming has a steep learning curve

Maybe for some, not for experienced practitioners, which I'd argue if you need to learn it perhaps you already have some computer science in your background - then not so steep.

I love functional approaches, don't get me wrong here, just don't appreciate rants so slanted and based in bias without real roots.