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

Jj jj jj jj jj

https://caiustheory.com/jj-jj-jj-jj-jj/
1•birdculture•31s ago•0 comments

Florida Is Executing Prisoners at a Record Pace

https://www.propublica.org/article/florida-death-penalty-executions-ron-desantis
1•petethomas•34s ago•0 comments

Death by Clawd: Hacker News Safe from AI Replacement

https://deathbyclawd.com/?url=news.ycombinator.com
1•adamhowell•43s ago•0 comments

Is there a "is fable up tracker" or notification hook?

1•217•1m ago•0 comments

Palantir vs. Republik [Swiss News Magazine]

https://www.republik.ch/2026/06/13/palantir-gegen-die-republik-das-urteil
1•Arodex•1m ago•1 comments

Reduce GVisor Cold Starts with GPU Snapshotting

https://cerebrium.ai/blog/reducing-gpu-cold-starts-with-memory-snapshots-restoring-cuda-workloads...
3•jono_irwin•4m ago•0 comments

Explaining relationship-based access control with a MIDI keyboard [video]

https://www.youtube.com/watch?v=nPL3W_oHSrE
1•melsmo•6m ago•0 comments

Show HN: I built a way for coding agents to use secrets with O seeing them

https://github.com/pdumicz/secret-shuttle
1•pdumicz•7m ago•1 comments

Show HN: Hunch, search your email by a hunch; with a conversation

https://margaine.com/hunch/
1•tlar•7m ago•0 comments

How the World Cup Builds Nations

https://www.nominalnews.com/p/wolrd-cup-football-nations-ethnicity
1•NomNew•9m ago•0 comments

Uber Shakes Up AI Data Labeling Business, Dismissing Top Leaders

https://www.bloomberg.com/news/articles/2026-07-01/uber-shakes-up-ai-data-labeling-business-dismi...
1•htrp•9m ago•1 comments

Why I like snake_case

https://graybeard.ing/why-i-like-snake_case/
2•rglover•11m ago•1 comments

My Notes After Databricks Data and AI Summit 2026

https://zilliz.com/blog/databricks-data-ai-summit-2026-data-layer
1•redskyluan•13m ago•0 comments

Vektorgeist

https://vektorgeist.com
1•Floukie•14m ago•0 comments

Grand Elemental, primordial matter churning like a living planet core

https://sand-morph.up.railway.app/grand-elemental-original
1•echohive42•15m ago•0 comments

Our First 66 Azure Deployments Show Interesting Patterns

https://webbynode.com/articles/our-first-azure-observations-strong-compute-emerging-network-signals
1•gsgreen•17m ago•1 comments

ZCode: GLM-5.2's own harness is officially live

https://twitter.com/zai_org/status/2072349453361557898
2•andrem•17m ago•1 comments

Proposed new satellite fleets could overwhelm the night sky

https://www.science.org/content/article/proposed-new-satellite-fleets-could-overwhelm-night-sky
2•Brajeshwar•18m ago•0 comments

Tidal hits subscribers with a 200% price increase

https://www.neowin.net/news/tidal-is-getting-a-price-hike/
1•bundie•19m ago•1 comments

Pidgin 3.0 Alpha 2 (2.96.0) has been released

https://discourse.imfreedom.org/t/pidgin-3-0-alpha-2-2-96-0-has-been-released/398
3•rw_grim•21m ago•0 comments

CorvinOS – self-hosted agentic OS where EU AI Act and GDPR compliance by design

https://github.com/CorvinLabs/CorvinOS
2•shumway•21m ago•0 comments

Amsterdam Invented the Fire Department

https://worksinprogress.co/issue/how-amsterdam-invented-the-fire-department/
2•Tomte•22m ago•0 comments

Ask HN: Freelancer? Seeking freelancer? (July 2026)

4•jon_north•22m ago•1 comments

Show HN: A cp wrapper that appends –reflink=always if possible to speed it up

https://github.com/CallMeAlphabet/fastcp
1•CallMeAlphabet•22m ago•0 comments

Microsoft plans job cuts, impacting <2.5% of workforce

https://www.businessinsider.com/microsoft-job-cuts-layoffs-sales-consulting-2026-6
2•akyuu•23m ago•0 comments

Te Lapa

https://en.wikipedia.org/wiki/Te_lapa
1•helterskelter•23m ago•0 comments

The Wealth of the Richest People in AI

https://futuresearch.ai/ai-researcher-net-worth/
2•ddp26•23m ago•0 comments

The Circle Bracket for World Cup - Open Source

https://www.thecirclebracket.com/
2•shaohua•23m ago•1 comments

F

https://news.ycombinator.com/submit
2•lokesh453•24m ago•1 comments

Personal Taste Is the Moat

https://wangcong.org/2026-01-13-personal-taste-is-the-moat.html
3•num42•24m ago•2 comments