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

Science sleuths uncover more than 100 suspicious images Thermo Fisher antibody

https://www.nature.com/articles/d41586-026-01706-2
1•Bender•1m ago•0 comments

Google wants to release up to 32M good mosquitoes California and Florida

https://ktla.com/news/google-wants-to-release-up-to-32-million-good-mosquitoes-in-california-and-...
1•Bender•2m ago•0 comments

William Chester Minor

https://en.wikipedia.org/wiki/William_Chester_Minor
1•petethomas•8m ago•0 comments

Gen Z are 'zebra striping' to avoid hangovers, scientists say it works

https://www.dailymail.com/sciencetech/article-15854983/Gen-Z-zebra-striping-avoid-hangovers-scien...
1•Bender•10m ago•0 comments

The Anarchist's Workbench [pdf]

https://blog.lostartpress.com/wp-content/uploads/2020/07/AWB_Consumer_June-2020_v5.1-1.pdf
1•wesleyd•12m ago•0 comments

Memo from the Interstellar Information Service – Re: Earth's Latest Space "Plan"

https://samhenrycliff.medium.com/memo-from-the-interstellar-information-service-re-earths-latest-...
1•6stringmerc•27m ago•0 comments

OpenJDK: Removal of the JVM Compiler Interface (JVMCI), in JDK 27

https://bugs.openjdk.org/browse/JDK-8382582
1•alasr•36m ago•0 comments

Harvard Graduation Speaker: "The Mission of Your Generation Is to Destroy AI"

https://www.yahoo.com/entertainment/tv/articles/harvard-graduation-speaker-unloads-ai-130000122.h...
3•poly2it•37m ago•2 comments

How Servers Work: A Hands-On Introduction to TCP Sockets

https://labs.iximiuz.com/tutorials/how-servers-work-tcp-sockets
1•birdculture•39m ago•0 comments

New AI Agent Architecture to fix LLM deviations and token costs

https://github.com/botcircuits-ai/botcircuits-agent
1•nexcatara•39m ago•0 comments

Taiwan's DRAM Failure [video]

https://www.youtube.com/watch?v=ehT3U935Pww
1•mgh2•40m ago•0 comments

Clint Eastwood Turns 96 as Son Kyle Says the Legendary Director Has "Retired"

https://www.worldofreel.com/blog/2026/5/31/happy-birthday-clint-eastwood
3•Michelangelo11•40m ago•0 comments

When FP? And when OOP? (2013)

https://raganwald.com/2013/04/08/functional-vs-OOP.html
1•downbad_•43m ago•0 comments

Read These Books by the Time You Graduate

https://www.theatlantic.com/books/2026/05/seven-books-graduate-young-adult-recommendations/687321/
1•paulpauper•44m ago•0 comments

The Kiwi Farms was targeted with a historic DDoS attack of up to 8Tbps last week

https://twitter.com/KiwiFarmsDotNet/status/2061199487855481199
2•gilfish•45m ago•2 comments

Legal Contract Version Control

https://github.com/SCCS-HQ/legal-contract-version-control
1•slveer•45m ago•1 comments

Mnemonic portraits for 19,023 human genes

https://brinedew.substack.com/p/mnemonic-portraits-for-19023-human
1•paulpauper•45m ago•0 comments

Ten EU countries are breaching the fiscal rules

https://www.ft.com/content/38119f3e-4570-4367-a014-9c5bd626cfb6
2•paulpauper•47m ago•0 comments

Europe's "most complex server processor" is running

https://www.heise.de/en/news/Europe-s-most-complex-server-processor-is-running-11308863.html
1•doener•48m ago•0 comments

Chuwi Minibook X: the netbook we deserve

https://tylercipriani.com/blog/2026/05/28/chuwi-minibook-x/
26•thcipriani•1h ago•22 comments

Retro Synthwave on YouTube

https://www.youtube.com/results?search_query=synthwave+before%3A2024-01-01&sp=EgIYAg%253D%253D
1•usernamed7•1h ago•1 comments

Wrote that Boomers were choking America's economy. Their responses are revealing

https://fortune.com/2026/05/31/boomer-reaction-economy-feel-stuck-confused-angry-sad-insecure/
5•ourmandave•1h ago•1 comments

State Engineering for Agents

https://twitter.com/kleptobyte/status/2060973079140929823
2•Kleptobyte•1h ago•0 comments

CXL-ClusterSim: Modeling CXL-Based Disaggregated Memory

https://arxiv.org/abs/2605.27745
1•rbanffy•1h ago•0 comments

Dear Steve Lemay

https://ilyabirman.net/meanwhile/all/dear-steve-lemay/
1•exizt88•1h ago•0 comments

Review of the MoErgo Glove80 Keyboard

https://arslan.io/2024/04/22/review-of-the-moergo-glove80-keyboard/
1•akyuu•1h ago•0 comments

Show HN: TIL – a timeline file format with a spiral viewer and editor

https://til.rfy.nz
1•rellfy•1h ago•0 comments

Show HN: Monolith, live typed queries on real Postgres for Java (no JDBC)

https://github.com/singlr-ai/monolith
1•uday_singlr•1h ago•0 comments

A Brief-Ish History of SETI. Part VIII: Paradox? What Paradox?

https://www.universetoday.com/articles/a-brief-ish-history-of-seti-part-viii-paradox-what-paradox
1•tcp_handshaker•1h ago•0 comments

Go Hug an Open Source Maintainer (and Is Rsync Slop Now?)

https://techstackups.com/articles/the-rsync-thing-and-why-you-should-be-nice-to-open-source-maint...
1•ritzaco•1h ago•0 comments