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

How Culture Shapes the Stories We Tell About Our Emotions (2024)

https://behavioralscientist.org/culture-shapes-stories-of-emotion/
1•the-mitr•1m ago•0 comments

Some Scientists Have 'Magic Hands' in the Lab. This A.I. Is Learning Why.

https://www.nytimes.com/2026/08/27/science/scientists-experiments-replication-ai.html
1•mitchbob•2m ago•1 comments

What It Took to Dismantle the Most Powerful Company in the World

https://www.nytimes.com/2026/08/28/opinion/ai-power-lobbying-military-britain-east-india-company....
1•Anon84•5m ago•0 comments

Atlantropa

https://en.wikipedia.org/wiki/Atlantropa
1•yitchelle•7m ago•0 comments

Iceland votes 'No' to reopening EU accession talks

https://www.euronews.com/my-europe/2026/08/30/iceland-votes-no-to-further-eu-accession-talks-in-t...
1•sehw•8m ago•0 comments

Rehearse a specific English work conversation before you have it

https://www.unfreezy.com
1•czaar1•8m ago•0 comments

Groom of the Stool

https://en.wikipedia.org/wiki/Groom_of_the_Stool
2•soupspaces•9m ago•0 comments

IguanaTex

https://github.com/Jonathan-LeRoux/IguanaTex
1•Eridanus2•10m ago•0 comments

Innovation Doesn't Happen on Schedule

https://www.thesignalist.io/s/innovation-doesnt-happen-on-schedule/
1•kodesko•11m ago•0 comments

The largest electric plane takes flight today

https://www.popsci.com/technology/worlds-largest-electric-plane/
1•thinkingemote•11m ago•0 comments

Scientists Create the Littlest Big Bang to Study the Universe's Origins

https://www.wired.com/story/scientists-create-littlest-big-bang-to-study-universe-origins/
1•joozio•12m ago•0 comments

When Led Zeppelin bombed in front of 1.9B people [video]

https://www.youtube.com/watch?v=PPJJdQfVxyg
1•jurf•12m ago•0 comments

Show HN: The Thousand – 1k founders, 1 question, one book

https://thethousand.co
1•jabed•12m ago•1 comments

Google Maps – Lake America

https://www.google.com/maps/place/Lake+America/@43.7036865,-79.2490163,8z/data=!3m1!4b1!4m6!3m5!1...
1•pseudolus•13m ago•0 comments

Columbia House Is Shutting Down

https://pitchfork.com/story/columbia-house-is-shutting-down/
1•pseudolus•21m ago•0 comments

He Did Not Conquer: Franklin's Failure to Annex Canada

https://reviewcanada.ca/magazine/2025/12/how-vain-an-attempt-review-he-did-not-conquer/
2•Bluestein•22m ago•0 comments

Show HN: Get your free AI search visibility scan

https://www.visiscan.app
1•not_wowinter14•23m ago•0 comments

Tortoise and the Birds – an African folktale recreated with Lego animation [video]

https://www.youtube.com/watch?v=EVHlqLa7-u0
1•CodePapi_•26m ago•1 comments

Show HN: Nuzzle – adorable live wallpapers of your pets

https://usenuzzle.com
1•13001r•26m ago•0 comments

Against Dumb Vibe Coding, Not Vibe Coding

https://funnygeek.com/essays/vibe-coding-speech/
1•ifoo•28m ago•1 comments

Show HN: Drop a SQL schema, get an interactive ER diagram

https://mcdview.dev/
1•PatuDev•28m ago•0 comments

Mitchell Hashimoto: Basic Superlogical Demo

https://twitter.com/mitchellh/status/2093451043661316217
2•mdrachuk•30m ago•0 comments

The U.S. Munitions Crisis

https://www.cfr.org/articles/the-u-s-munitions-crisis
2•Betelbuddy•31m ago•1 comments

Show HN: Time tracking for solo consultants that ends in a PDF invoice

https://hourtobill.com/demo
1•Stackedboost•32m ago•0 comments

Tja – TUI for learning German verbs in your terminal, one-armed-bandit style

https://github.com/progapandist/tja
2•progapandist•32m ago•2 comments

US Threatens Britain over Falklands

https://www.telegraph.co.uk/world-news/2026/08/28/us-uk-boost-defence-spending-lose-falklands-sup...
1•Betelbuddy•34m ago•1 comments

Iceland votes against restarting talks on joining EU

https://www.bbc.com/news/articles/c70le8ed1plo
2•vinni2•34m ago•0 comments

Show HN: Train 300M/32-Layer Model in 1.5GB RAM on Base M1 Mac

1•vlad_kalinkin•35m ago•0 comments

Only believe what you can validate: a verification framework for agentic AI

https://devblogs.microsoft.com/all-things-azure/only-believe-what-you-can-validate/
2•yani__•37m ago•0 comments

Delhi Metro Jazz

https://www.delhimetrojazz.com/
1•mscholz•39m ago•0 comments