Settings

Theme

(Dis)Honest Functions

bendik.dev

2 points by bendiksolheim 5 years ago · 3 comments

Reader

curtisblaine 5 years ago

So you're arguing that a function has to be pure to be "honest"? It seems a bit arbitrary. Why not the other way around?

  • bendiksolheimOP 5 years ago

    Author here. My intention was to try to define "honest" in terms of already established terms. Pure and total have quite specific definitions in programming, so it doesn’t feel right to define pure in terms of honest.

    A better way to put it might be that a pure and total function will also be honest, but a function might be honest without being fully pure. E.g. if its name indicates that it performs IO, it’s still honest even though it’s not pure.

    Thanks for the comment, I might end up clarifying this later tonight :)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection