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•11mo 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•11mo 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•11mo 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•11mo 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•11mo ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•11mo ago
Agreed

Alexander Karp's Manifesto

https://www.engadget.com/big-tech/palantir-posted-a-manifesto-that-reads-like-the-ramblings-of-a-...
1•yoyohello13•8s ago•0 comments

The Peoples of America

https://www.palladiummag.com/2026/04/16/the-peoples-of-america/
1•NaOH•1m ago•0 comments

Building an OPNsense router

https://clintonboys.com/projects/homelab/04-router/
1•mtsolitary•2m ago•1 comments

Show HN: SkillCatalog, a Git-native skill manager for AI coding tools

https://skillcatalog.dev
1•sformisano•4m ago•0 comments

'No Random Woman Is Getting What I Built': Founder Reveals 'Floozy Clause'

https://www.ibtimes.co.uk/rebecca-minkoff-floozy-clause-family-wealth-1792608
1•randycupertino•4m ago•0 comments

Data Center Is Getting a $77M Tax Break to Create One Job

https://nysfocus.com/2026/04/20/data-center-tax-break-jpmorgan-chase
1•jaredwiener•4m ago•0 comments

New config file format based on Markdown

https://github.com/mol-format/mol-specs
1•dankrusi•4m ago•1 comments

ChatGPT and Codex Down

https://status.openai.com/incidents/01KPNN2V2SMP3TAN3MCJK87W50
2•written-beyond•7m ago•1 comments

President Graph – Fred Data Broken Down by Party and President

https://probablydance.com/2026/04/18/president-graph-fred-data-broken-down-by-party-and-president/
2•ibobev•7m ago•0 comments

Show HN: Agentkit-CLI, one canonical context file for AI coding agents

https://mikiships.github.io/agentkit-cli/
1•miki_ships•7m ago•0 comments

How the Heck does Shazam work?

https://perthirtysix.com/how-the-heck-does-shazam-work
3•datadrivenangel•8m ago•0 comments

Electric car sales soar 51% in mainland Europe as Iran war drives up fuel prices

https://www.theguardian.com/environment/2026/apr/20/electric-car-ev-sales-mainland-europe-petrol-...
2•ciconia•8m ago•0 comments

The fastest way to match characters on ARM processors?

https://lemire.me/blog/2026/04/19/the-fastest-way-to-match-characters-on-arm-processors/
1•ibobev•8m ago•0 comments

Persistence of Vision

https://danilafe.com/writing/spirits/
1•ibobev•9m ago•0 comments

Observability for AI Agents

https://cloudpresser.com/writing/observability-for-ai-agents
1•cloudpresser•10m ago•0 comments

America Is in the Middle of a Stealth Manufacturing Boom

https://www.wsj.com/economy/america-is-in-the-middle-of-a-stealth-manufacturing-boom-af0702af
1•JumpCrisscross•13m ago•0 comments

Adventures with Anycast – Building a Public Anycast Network

https://preview-anycast.oh2xab.pages.dev/Building-Anycast-Network/
2•alibarber•14m ago•0 comments

The most expensive system is the one nobody remembers building

https://joshpanka.substack.com/p/the-most-expensive-system-is-the
1•posterity•14m ago•0 comments

Southern California residents sentenced in bear suit insurance fraud scheme

https://abc7.com/post/3-southern-california-residents-sentenced-bear-suit-insurance-fraud-scheme/...
1•Alupis•14m ago•0 comments

India's Expanding Site Blocking Orders Hit Legal Wall at Delhi High Court

https://torrentfreak.com/indias-expanding-site-blocking-orders-hit-legal-wall-at-delhi-high-court/
2•Brajeshwar•16m ago•0 comments

New Posts

https://mag.openrockets.com/p/developmental-integrity-di-and-the-cognitive-environments-why-minor...
1•openrockets•23m ago•1 comments

Most people care about farm animals – our food system doesn't reflect that

https://ourworldindata.org/most-people-care-about-farm-animals-our-food-system-doesnt-reflect-that
3•alphabetatango•23m ago•0 comments

Show HN: Made a highly organised email client with prompt-free AI within

1•neerajnathany•23m ago•0 comments

RedSun and UnDefend: Unpatched Exploit Turning Windows Security Against Itself

https://cyberspit.com/redsun-undefend-defender-zero-days.html
3•KandiBrian•25m ago•0 comments

Agent Skills move too fast for Git

https://www.sleuth.io/post/agent-skills-move-too-fast-for-git/
2•detkin•25m ago•0 comments

USPS Inspector General Issues Alert on Counterfeit Postage

https://www.ecommercebytes.com/2026/04/20/usps-inspector-general-issues-alert-on-counterfeit-post...
1•ilamont•25m ago•0 comments

Imperialist appropriation in the world: Drain from Gl. South v/ unequal exchange

https://www.sciencedirect.com/science/article/pii/S095937802200005X
2•y0eswddl•27m ago•1 comments

No Lines, No 'Regular' People: Flying Ultra-Luxury from Paris

https://www.nytimes.com/2026/04/06/travel/first-class-luxury-flight-air-france-la-premiere.html
4•bookofjoe•28m ago•1 comments

Show HN: Scryptian – Run Local AI Skills via Ctrl and Alt (Python and Ollama)

https://github.com/adrianium/Scryptian
1•bonsuaq•29m ago•1 comments

Your models are collapsing because they are closed loops.

https://www.amazon.co.uk/dp/B0GWLFR2P6
1•martynagass•30m ago•1 comments