Ask HN: Which function definition keyword do you prefer, def or fn?
1 winwang 5 5/10/2025, 5:12:27 PM
I'm curious about what people think of `def` vs `fn`, two short keywords for starting function definitions.
...Or maybe we should subscribe to the church of `df`, haha.
"fn" is too cryptic.
"function" is better than the two.
fn isnt a legitimate short form of function
fun doesnt work because of the amusement factor
func is the only alternative we have left
These don't have the full fidelity as hn scrubs emojis
add = (a, b) -> a + b
a, b ⟹ a + b
λ add(a, b): ↪ a + b