frontpage.
newsnewestaskshowjobs

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

CryptoLogin: Show HN – No email, no password. Just a master secret

https://github.com/erabytse/CryptoLogin
1•takouzlo•5m ago•0 comments

The fastest search engine for award travel

https://seats.aero/
1•momentmaker•9m ago•0 comments

The Galactic Empire Was Always Gonna Fail

https://jimmyalfonsolicon.substack.com/p/the-galactic-empire-was-always-gonna
1•jger15•10m ago•0 comments

Walkable Neighborhoods Finder

https://close.city/
2•momentmaker•11m ago•0 comments

Save Wisdom Questions

https://savewisdom.org/the-1000-word-save-wisdom-questions/
1•momentmaker•12m ago•0 comments

Tech Slide Deepens as AI Fears Get Worse

https://www.wsj.com/livecoverage/stock-market-today-dow-sp-500-nasdaq-06-23-2026
2•doener•14m ago•1 comments

A scientist says he can scan prisoners' brains for signs of evil

https://www.theguardian.com/us-news/ng-interactive/2026/jun/23/scientist-us-legal-system-violence...
2•mellosouls•14m ago•0 comments

The Warfare of the Future Is Here

https://www.noemamag.com/the-warfare-of-the-future-is-already-here/
1•sharjeelsayed•15m ago•0 comments

Not so empty nesters: record-high number of US adults under 35 live at home

https://www.theguardian.com/society/2026/jun/18/us-adults-under-35-living-at-home
1•littlexsparkee•15m ago•0 comments

Write Like Paul Graham

https://paulgraham.mooch.agency/
2•tahigichigi•17m ago•0 comments

The Struggle Is Valuable

https://blog.jobelenus.dev/blog/struggle-creates-value/
2•mooreds•20m ago•0 comments

Envoy AI Gateway 1.0 – A Stable, Production-Ready AI Gateway

https://aigateway.envoyproxy.io/blog/v1.0-release-announcement/
3•zoltano•27m ago•0 comments

Twenty Years Later, Everything Is the Truman Show (2018)

https://www.vanityfair.com/hollywood/2018/06/truman-show-anniversary-jim-carrey-peter-weir-laura-...
6•thoughtpeddler•28m ago•0 comments

How to Think About AI Before It's Too Late

https://www.theatlantic.com/podcasts/2026/06/how-to-think-about-ai-before-its-too-late/687644/
2•joebuckwilliams•29m ago•0 comments

TOP500 – June 2026 List

https://top500.org/lists/top500/2026/06/
3•NKosmatos•30m ago•0 comments

Generate per-session LoRA adapters in <1s for agentic inference efficiency

https://github.com/theoddden/Tessera
2•Facingsouth•30m ago•1 comments

Show HN: AnswerJournal – An MCP server to save and share AI answers

https://answerjournal.com/
3•daniban•33m ago•0 comments

Deciphering Basmalah

https://blog.plover.com/2026/06/23/
2•frizlab•37m ago•0 comments

Show HN: Pencil – Obsidian plugin to write, draw, sync

https://github.com/rcanand/obsidian-pencil
2•rcanand2025•37m ago•0 comments

As Chinese Tech Pulls Ahead, U.S. Fears It Will Become Dependent

https://www.nytimes.com/2026/06/23/business/economy/china-megafactory-us-tech-race.html
5•mikhael•39m ago•0 comments

John Carmack on why he would push back against anti-datacenter efforts

https://twitter.com/i/status/2069486595917402117
6•alexcos•40m ago•4 comments

Formisch V1 – A Vite-inspired lightweight form builder

2•Abutterflye•40m ago•0 comments

Philip K. Dick Takes You Inside His Life Changing Mystical Experience (2014)

https://www.openculture.com/2014/05/philip-k-dick-takes-you-inside-his-life-changing-mystical-exp...
2•Jimmc414•40m ago•1 comments

Carbon Language: An experimental successor to C++

https://github.com/carbon-language/carbon-lang
3•theanonymousone•40m ago•0 comments

Active Group and "Agentic Engineering"

https://funktionale-programmierung.de/en/2026/06/23/agai.html
3•marvinborner•43m ago•1 comments

Ask HN: Has anyone replaced a human receptionist with AI for a

2•VaderAi•44m ago•0 comments

America's data-centre backlash puts the AI boom at risk

https://www.economist.com/business/2026/06/23/americas-data-centre-backlash-puts-the-ai-boom-at-risk
2•edward•45m ago•1 comments

California AB 2047 makes 3d printers off-limits to students, educators, business

https://www.the3dprintingnerd.com/ab2047
104•Buildstarted•47m ago•27 comments

Embedded Skills Tree

https://embedded.fm/blog/2023/5/19/embedded-skills-tree
3•arbayi•52m ago•0 comments

A tiny shared Linux system

https://mbox.blue/
4•davidcollantes•52m ago•0 comments