frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Which function definition keyword do you prefer, def or fn?

1•winwang•1y ago
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.

Comments

sitkack•1y ago
def could be for lots of things, fn is for functions. I don't think it matters much as long as you have one. C would have been so much easier to parse. Just copy Zig or Rust.
butlersean•1y ago
def means define, could be used to define all kinds of things

fn isnt a legitimate short form of function

fun doesnt work because of the amusement factor

func is the only alternative we have left

sitkack•1y ago
How about unicode or emojis?

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

johncoltrane•1y ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•1y ago
Agreed

Spammail.org – disposable email infrastructure, aliases, custom domains and IMAP

https://spammail.org/
1•kipdev•5m ago•0 comments

Try, even if they have you cold

https://www.lesswrong.com/posts/aBhMGziEwA7FXNxhq/try-even-if-they-have-you-cold
2•mefengl•8m ago•0 comments

Ratty – A terminal emulator with inline 3D graphics

https://ratty-term.org/
1•orhunp_•11m ago•0 comments

The Inference Shift

https://stratechery.com/2026/the-inference-shift/
3•swolpers•13m ago•0 comments

Cotypist – AI Autocomplete for Mac

https://cotypist.app/
1•AndrewDucker•14m ago•0 comments

Projecting React

https://tannerlinsley.com/posts/projecting-react
2•brandrick•18m ago•0 comments

Why Was Star Fox Called Lylat Wars in Europe? [video]

https://www.youtube.com/watch?v=3VlZ7gs-Z6Q&list=PLYGwstCQBscexot2j-u22LQSmgH9vCxKr
1•brandrick•20m ago•0 comments

All Those A.I. Note Takers? They're Making Lawyers Nervous

https://www.nytimes.com/2026/05/09/business/dealbook/ai-notetakers-legal-risk.html
2•JumpCrisscross•20m ago•0 comments

When Is "Next Friday"?

https://whenisnextfriday.com/
2•wjdp•24m ago•0 comments

AI: Apologies, I was only doing as instructed. (What Hollow is and isn't)

https://ninjahawk.github.io/blog/posts/what-hollow-is.html
1•ninjahawk1•25m ago•0 comments

Our keyboards are tracking us

1•tukunjil•25m ago•1 comments

Do city delivery drones make sense?

https://www.wired.com/story/do-city-delivery-drones-make-sense-no-one-knows-but-theyre-flying-ove...
1•FinnLobsien•26m ago•0 comments

Building a Memory Allocator from Scratch in C

https://0xkiire.com/memory-allocators/
1•kiirecodes•31m ago•0 comments

Scorpi – a Docker-like VM development platform for macOS

https://fuse-t.org/scorpi/
1•concerned_ctzn•32m ago•0 comments

Life Without US Tech

https://www.ft.com/content/4c3aad70-e0cb-46a2-95d5-15d11b6bf818
5•frb•32m ago•0 comments

Facto: The daily trivia game that makes you learn one new fact every single day

https://factoquizzy.web.app
1•Mwalwala•33m ago•1 comments

Comparisons as Predictable as the Sunrise

https://pudding.cool/2026/05/similes/
1•latexr•41m ago•0 comments

Piping terminal output to the browser using systemfd

https://blog.izissise.net/posts/webdev-livecompile/
1•ingve•41m ago•0 comments

I Do Not Recommend Fastmail

https://www.vincentschmalbach.com/why-i-do-not-recommend-fastmail-for-primary-email/
3•vincent_s•42m ago•1 comments

A game based on scrolling and zooming

https://www.vaskange.world/
4•skywal_l•44m ago•1 comments

Show HN: An addictive phone game about phone addiction

https://downtime.partridge.works
2•urbandw311er•45m ago•0 comments

Recovering from Narcissistic Abuse

https://www.pasthepast.com/p/recovering-from-narcissistic-abuse
1•ElysiumAbove•45m ago•0 comments

Women at the sharp end as AI takes over administrative roles

https://www.ft.com/content/946650d6-f61f-4b98-8bb5-c0020c8a205f
1•johnbarron•48m ago•3 comments

Using AGENTS.md / Claude.md to discourage AI-generated code contributions

https://fosstodon.org/@backintime/116555237447115014
1•buhtz•52m ago•0 comments

Capsules: Compile-time lock discipline in OxCaml

https://kcsrk.info/ocaml/oxcaml/modes/blogging/2026/05/08/capsules-in-oxcaml/
1•ibobev•53m ago•0 comments

The Eurovision Song Contest and the European Union

https://chuniversiteit.nl/papers/eurovision-song-contest-and-eu
2•ibobev•54m ago•0 comments

A simple runtime invariant miner

https://rahul.gopinath.org/post/2026/05/09/simple-invariant-miner/
2•ibobev•54m ago•0 comments

Chaos erupts as cyberattack disrupts learning platform Canvas amid finals

https://arstechnica.com/security/2026/05/chaos-erupts-as-cyberattack-disrupts-learning-platform-c...
3•mblome•55m ago•0 comments

Lython: Experimental Python compiler toolchain based on LLVM

https://github.com/t3tra-dev/lython
2•kozika•1h ago•1 comments

I built my second brain for meetings. No monthly subscription

https://appmemora.app
4•kozielgpc•1h ago•1 comments