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

Fal Raises $1.65B Across Series E and F by Sequoia and Bessemer [video]

https://www.youtube.com/watch?v=pPzJ1wE8Lnw
1•amrrs•2m ago•0 comments

The Mystery of the Baklava Man (2018)

https://thetyee.ca/News/2018/04/05/Mystery-Baklava-Man-Syria-Vancouver/
1•wmchen•3m ago•0 comments

Is Curiosity Good for Us?

https://www.lrb.co.uk/the-paper/v48/n20/adam-phillips/is-curiosity-good-for-us
1•NaOH•3m ago•0 comments

UK pair aim to complete most complex board game

https://www.theguardian.com/lifeandstyle/2026/oct/31/uk-complete-worlds-most-complex-board-game-t...
1•tnorthcutt•6m ago•0 comments

What Rami Ismail learned with his return to game development

https://www.gamedeveloper.com/design/what-rami-ismail-learned-with-his-return-to-game-development
1•HelloUsername•7m ago•0 comments

At least 33 dead after Russia drops nine bombs on a Ukrainian school building

https://www.cnn.com/2026/11/03/europe/ukraine-russia-zaporiszhzha-school-strike-intl
3•consumer451•8m ago•0 comments

The Family Plan

https://magazine.atavist.com/2026/the-family-plan-c3g-disease-iowa
1•gmays•8m ago•0 comments

Panthera: Ampere's CPU Performance Model

https://github.com/AmpereComputing/panthera
1•mshockwave•8m ago•0 comments

Composing fraud rules faster with classical ML and AI-assisted review

https://tech.affirm.com/composing-fraud-rules-at-the-speed-of-the-attack-7f6e05edc2a5
1•alexanderstatni•8m ago•0 comments

Itch.io Deletes 'Terabytes' of AI Slop in to Counter Surge in Game Uploads

https://kotaku.com/itch-io-gen-ai-slop-terrabytes-deleted-claude-chagpt-steam-epic-2000752485
3•speckx•9m ago•0 comments

Show HN: Home Poker Ledger – settle a poker game, one HTML file, no server

https://homepokerledger.com/
1•calk•9m ago•0 comments

PixelLoupe 1.3 – free, open source Lightroom replacement for macOS

https://pixegen.net/pixelloupe/
1•sonicbluestrats•9m ago•0 comments

NYT demands Brave shut down its paywall blocker and end deals with AI firms

https://arstechnica.com/tech-policy/2026/11/nyt-demands-brave-shut-down-its-paywall-blocker-and-e...
1•samizdis•10m ago•0 comments

"Projects" is a new harness pattern, and it is effective

https://subjunct.bearblog.dev/projects-is-a-new-harness-pattern-and-it-is-very-effective/
1•alexh•12m ago•0 comments

ILC Dover, ILC Astrospace Agree to Pay $13M over Cybersecurity Fraud Claims

https://www.justice.gov/opa/pr/defense-and-aerospace-contractors-ilc-dover-and-ilc-astrospace-agr...
2•wmchen•13m ago•0 comments

Show HN: Scriptorium – Turning Lectures into Obsidian Notes and SR Flashcards

https://github.com/alessiocelentano/scriptorium
1•gbocs•13m ago•0 comments

Rambler – A journal for your train of thought

https://github.com/eoind08/Rambler
1•eoind08•13m ago•0 comments

The Ternus Doctrine

https://asymco.com/2026/11/03/the-ternus-doctrine/
1•zdw•15m ago•0 comments

Who broke CI this time?

https://yeet.cx/blog/who-broke-ci
2•zasc•17m ago•0 comments

278M PII detection model bests OpenAI, AWS and Microsoft

https://arxiv.org/abs/2610.30518
2•skjhn•17m ago•2 comments

Git commit based reproducible builds with Maven

https://blog.melnib.one/2026/11/01/git-commit-based-reproducible-builds-with-maven/
1•speckx•18m ago•0 comments

Apple Launches Beta Versions of Watch AI Listening Tools, New Health App

https://www.bloomberg.com/news/articles/2026-11-03/apple-releases-ios-27-3-beta-with-watch-ai-lis...
1•dadadavid•20m ago•0 comments

America's Cold War in Greenland

https://lflank.wordpress.com/2026/11/03/americas-cold-war-in-greenland/
1•dxs•21m ago•0 comments

How close does score-to-audio sync land? 16 piano recordings, measured

https://www.sheetvideo.com/research/sync-accuracy
1•draganzivkovic•22m ago•0 comments

How Software Engineering Is Changing

https://newsletter.pragmaticengineer.com/p/how-software-engineering-is-changing
2•neilkakkar•24m ago•0 comments

A free live outage feed for your agents

https://outages.live/
1•gneray•25m ago•0 comments

Dear 2040

https://whatthefuckjusthappenedtoday.com/dear-2040/
1•outofstep•26m ago•0 comments

Proving LLMs at Scale

https://attestable.com/blog/proving-llms-scale
1•ronfriedhaber•26m ago•0 comments

You're paying too much for code review

https://blog.brokk.ai/youre-paying-too-much-for-code-review/
2•jbellis•31m ago•1 comments

Show HN: Ideas for building better cross-platform apps

https://github.com/rkaehn/uniform
1•rkaehn•31m ago•0 comments