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

Is Nvidia "too big to fail"?

https://www.washingtonpost.com/technology/2026/12/05/jensen-huang-return-may-accelerate-race-comp...
1•nephihaha•1m ago•0 comments

Johnny and the Cryptographic Apocalypse

https://niyikiza.com/posts/johnny-cryptographic-apocalypse/
1•niyikiza•1m ago•0 comments

The Global Flourishing Study

https://globalflourishingstudy.com
1•myth_drannon•2m ago•0 comments

Text Plugin for OBS (In Browser View)

https://w.merkoba.com/obtext/
1•madprops•2m ago•0 comments

The Bar Museum: Histories of Closed Bars, Dives and Music Clubs

https://thebarmuseum.com
1•gnabgib•4m ago•0 comments

Could Your Smartphone Assess Heart Failure Risk? New AI Studies Body Shape

https://www.ibtimes.co.uk/ai-smartphone-body-shape-heart-failure-risk-1836991
1•jboyonline•4m ago•0 comments

Time Travel on Professional Profiles [pdf]

https://www.nber.org/system/files/working_papers/w35546/w35546.pdf
1•rustoo•5m ago•0 comments

Securing Python projects from supply-chain attacks

https://astral.sh/blog/securing-from-supply-chain-attacks
1•rbanffy•5m ago•0 comments

When I Vanished

https://aeon.co/essays/what-altered-states-reveal-about-the-shape-of-the-mind
1•marojejian•5m ago•0 comments

Show HN: A dedicated inbox for code review

https://plannotator.ai/inbox/review/
2•ramoz•6m ago•0 comments

Show HN: A fast Hacker News new tab – one request, 60 KB, no framework

https://chromewebstore.google.com/detail/hacker-news-tab/iomhobpchcjpkijgdnjkiphbdnaheope
1•marciob•6m ago•0 comments

NSA weighing restrictions on AI-powered cryptography work

https://www.reuters.com/world/us-nsa-weighing-restrictions-ai-powered-cryptography-work-2026-12-06/
2•m-hodges•8m ago•0 comments

Mastodon 5.0

https://blog.joinmastodon.org/2026/12/mastodon-5.0/
3•ravenical•10m ago•0 comments

The stock market has become impossible to value

https://economist.com/finance-and-economics/2026/12/06/the-stock-market-has-become-impossible-to-...
2•andsoitis•12m ago•0 comments

App Store Ads Are a Scam

https://www.magiclasso.co/insights/app-store-ads-are-a-scam/
2•bentocorp•12m ago•0 comments

Clothesline Art

https://dullmensclub.com/clothesline-art-celebrating-the-ordinary/
1•austinallegro•13m ago•0 comments

Iran says women can ride motorcycles – but only if they wear a hijab

https://www.bbc.com/news/articles/cm9d74128nzpo
1•onemoresoop•14m ago•0 comments

Show HN: MagsGalore Internet Archive Magazine Index

https://magsgalore.popblender.com
1•elronster•15m ago•1 comments

Lutnick Meddled in Nvidia Probes So Much That His Deputies Went to FBI

https://newrepublic.com/post/218584/lutnick-intefered-nvidia-probes-deputies-fbi
10•cdrnsf•16m ago•0 comments

Show HN: Kisko Networks

https://blinkingrobotmedia.com/play/kisko-networks/
1•reklis•16m ago•0 comments

Emacs turns 50: How the editor shaped the software world

https://www.heise.de/en/background/Emacs-turns-50-How-the-editor-shaped-the-software-world-115508...
2•smartmic•17m ago•0 comments

I asked my cgpt for number between 1-100

1•dash_ali•17m ago•0 comments

John Scalzi – Five Years a Church Owner

https://whatever.scalzi.com/2026/12/06/five-years-a-church-owner/
2•filipecgarcia•21m ago•0 comments

Reading the negative answer to the invariant subspace problem – Terence Tao [video]

https://www.youtube.com/watch?v=uMrZxpr8gWE
1•amichail•24m ago•0 comments

Show HN: Facing agent obedience issues, I built my own with path-traversal locks

https://uneven.dev
1•kreive•26m ago•0 comments

Show HN: Brood Agent – A code-mode RLM harness built on Elixir

https://broodagent.com/
1•dimgl•26m ago•0 comments

SSH has moved to post-quantum cryptography. JWT mostly has not

https://opencbom.com/writing/ssh-jwt-post-quantum/
1•simonpn•26m ago•0 comments

Show HN: Run your fleet of agents from grokbot on any machine

https://github.com/vib-z/stampede
1•vib_z•27m ago•2 comments

Cephalopod Beak

https://en.wikipedia.org/wiki/Cephalopod_beak
1•nomilk•28m ago•0 comments

"I Know Better Than You": Evaluating Silent Instruction Overrides Across 15 LLMs

https://arxiv.org/abs/2612.03914
2•user_7832•30m ago•0 comments