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

The Secret Lives of China's Art Factory Workers

https://www.instapainting.com/blog/the-secret-lives-of-china-art-factory-workers
1•chrischen•43s ago•0 comments

AI can track a single bird over time–based solely on its song

https://www.science.org/content/article/ai-can-track-single-bird-over-time-based-solely-its-song
1•Brajeshwar•58s ago•0 comments

New "high safety" chemicals in plastic food packaging linked to low birth weight

https://www.theguardian.com/us-news/2026/nov/07/nontoxic-plastic-lower-birth-weight-study
1•sandebert•2m ago•1 comments

Show HN: Bobr – a rootless content-addressed build system for Linux

https://bobr.build/
1•alekseimakarov•2m ago•0 comments

Did aliens talk to us in "binary code" at Rendlesham Forest?

https://kevinboone.me/rendelsham-binary.html
2•andsoitis•3m ago•0 comments

Indonesia deploys over 20k troops, generals arrested for wiretapping allegations

https://apnews.com/article/indonesia-security-forces-deployment-wiretapping-8e598661a904d8af89b35...
1•iamnothere•3m ago•0 comments

Netlens.dev

https://netlens.dev
1•6bR35•3m ago•0 comments

Deposition of Atmospheric Microplastics in Snowfall of the Sierra Nevada

https://pubs.acs.org/esthag/article-abstract/doi/10.1021/acs.est.6c02757/5458893/Event-Scale-Depo...
1•blondie9x•4m ago•0 comments

The Gordon Gekko Effect: The Role of Culture in the Financial Industry [pdf]

https://www.newyorkfed.org/medialibrary/media/research/epr/2016/epr_2016_gordon-gekko-effect_lo.pdf
1•tylerdane•4m ago•1 comments

Dune – unholy combination of bash and Lisp

https://adam-mcdaniel.github.io/dune-website/
1•andsoitis•7m ago•0 comments

A Cruise to End All Cruises

https://www.newyorker.com/news/annals-of-the-sea/a-cruise-to-end-all-cruises
1•fortran77•7m ago•0 comments

What I heard at the Legal and Licensing Workshop 2026

https://www.thomas-huehn.com/what-i-heard-at-llw-2026/
1•Tomte•9m ago•0 comments

Patrick Stewart, Susan St. James, and the Brilliant Transformation of Fatherhood

https://www.realclearmarkets.com/articles/2026/11/07/patrick_stewart_susan_st_james_and_the_brill...
1•RickJWagner•11m ago•0 comments

Microsoft open-sources DACS: stalled data loads fell from 14% to 0.1%

https://opensource.microsoft.com/blog/2026/11/05/accelerate-data-access-for-inference-and-trainin...
1•wondersky•13m ago•0 comments

Excuse my French? The swear words that used to be illegal in Canada

https://www.bbc.com/travel/article/20261104-the-swear-words-that-used-to-be-illegal-in-canada
1•BiraIgnacio•16m ago•1 comments

Show HN: Trailback – Offline, encrypted search for everything on your Mac/PC

https://trailback.app/
2•trailback•16m ago•0 comments

I don't care if web content is AI-generated

https://kevinboone.me/ai.html
3•andsoitis•20m ago•0 comments

The $8 Linux Computer (2022)

http://thelittleengineerthatcould.blogspot.com/2022/12/the-8-linux-computer.html
2•zenincognito•23m ago•0 comments

Breadwinner backlash: The gendered effects of industrial decline

https://onlinelibrary.wiley.com/doi/10.1111/ajps.70080
1•geox•23m ago•0 comments

Show HN: Chrome extension to block sites and increases attention span

https://chromewebstore.google.com/detail/distractfree/ajpmebphgmoblmkfplilfdnfkecbhhko
1•ramthokane•23m ago•0 comments

Former Meta Security Chief Calls Password Access for AI Agents 'Insane'

https://epyhia.com/meta-launches-muse-ai-spaces-former-security-chief-calls-password
2•arbuge•24m ago•0 comments

Git-bug v0.12.0 now uses host Git configuration and optionally host Git binary

https://github.com/git-bug/git-bug/releases/tag/v0.12.0
1•iamnothere•26m ago•0 comments

The Weil conjectures formalized in Lean

https://axiommath.ai/research/the-weil-conjectures-formalized-in-lean/
1•torutofu•27m ago•0 comments

Re-Releases of Wing Commander, Ultima Titles Hit Steam and GOG

https://arstechnica.com/gaming/2026/11/ea-producer-tells-the-inside-story-behind-new-wing-command...
2•throw0101d•29m ago•1 comments

Show HN: I made a guardrail against AI outreach slop (API/MCP)

https://maildignity.com/
4•harryden•35m ago•0 comments

Why does America hate AI?

https://www.ft.com/content/af97585a-3381-42a9-838b-9a205ab81232
2•bookofjoe•37m ago•2 comments

Business Explainability in Systems Is Not a Nice-to-Have Anymore

https://medium.com/@Rabea/business-explainability-in-systems-is-not-a-nice-to-have-anymore-ea58fc...
2•rabee3•40m ago•0 comments

AI Santa Video Generator – Personalized Santa Videos

https://aisantavideo.net
2•jacksteven•45m ago•0 comments

Cancer at Sea

https://biographic.com/cancer-at-sea/
2•bryanrasmussen•46m ago•0 comments

Ur-Nammu Founder of the Sumerian Renaissance

https://www.worldhistory.org/Ur-Nammu/
2•Bluestein•48m ago•0 comments