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

The Emperor's Old Clothes [pdf]

https://worrydream.com/refs/Hoare_1981_-_The_Emperors_Old_Clothes.pdf
1•pykello•1m ago•0 comments

Dissolving the Fermi Paradox (2018)

https://arxiv.org/abs/1806.02404
1•bumbledraven•9m ago•0 comments

Ask HN: Why are the tech companies tracking humans?

3•roschdal•12m ago•0 comments

City Layout Guessr Game

https://noahdarwinlee.com/citylayoutguessr/
2•noahdlee•13m ago•0 comments

Jetpack: Consensus Made Generally Fast (OSDI '26)

http://muratbuffalo.blogspot.com/2026/09/jetpack-consensus-made-generally-fast.html
3•gavide•18m ago•0 comments

White House weighs Defense Production Act to expand US oil refining capacity

https://www.reuters.com/business/energy/white-house-weighs-how-use-defense-production-act-expand-...
3•geox•22m ago•0 comments

A2ABreak: Systematic Security Analysis of the A2A Protocol

https://arxiv.org/abs/2609.10871
2•sbulaev•27m ago•0 comments

Russian developers used Claude to build 'kamikaze' attack drone software

https://www.theguardian.com/world/2026/sep/12/ukraine-war-briefing-russian-developers-used-ai-to-...
3•warrenmiller•31m ago•0 comments

A Nix store is three functions

https://fzakaria.com/2026/09/11/a-nix-store-is-three-functions
2•Tomte•31m ago•0 comments

Hearts of Iron IV, Part I: Operational Art

https://acoup.blog/2026/09/11/teaching-paradox-hearts-of-iron-iv-part-i-operational-art/
2•Tomte•32m ago•0 comments

Show HN: A high-performance, all-in-one extension for managing tabs

https://chromewebstore.google.com/detail/leotabs-—-tab-manager-swi/heolckkdeandgagkiefggcneodni...
3•ringlochid•33m ago•0 comments

Judeo-iraqi Arabic

https://en.wikipedia.org/wiki/Judeo-Iraqi_Arabic
2•marysminefnuf•35m ago•0 comments

Age of Enlightenment

https://en.wikipedia.org/wiki/Age_of_Enlightenment
3•num42•37m ago•0 comments

Planck Scale

https://en.wikipedia.org/wiki/Planck_units
4•num42•38m ago•0 comments

Show HN: Poptimum – A Daily Optimization Game

https://poptimum.fun/
3•ShayHDavidson•42m ago•1 comments

WeWorm: Zero-Click WeChat Worm

https://calif.io/research/weworm
3•BlackEarth•45m ago•0 comments

Show HN: GenieUI – Turn prompts into editable iOS and Android interfaces

https://genieui.com/
2•andygeek•59m ago•0 comments

Trails – Jac Hacks

https://github.com/tirthsuba15/trails-jac-hacks
2•tirthsuba•59m ago•0 comments

The Unspoken Skill of Finesse

https://newsletter.weskao.com/p/the-unspoken-skill-of-finesse
1•AntonZ234•1h ago•0 comments

Anthropic Says Iran Used Its American AI Model to Target U.S. Navy Warships

https://www.wsj.com/politics/national-security/anthropic-says-iran-used-its-american-ai-model-to-...
2•kaycebasques•1h ago•1 comments

Bending Spoons keeps buying iconic products, who's next?

https://nextspoons.com/
1•napolux•1h ago•0 comments

Teaching Novice Computing and Programming in the Agentic AI Era

https://cs.brown.edu/people/sk/Publications/Papers/Published/fkl-teach-nov-agentic-ai-era/
1•matt_d•1h ago•0 comments

Show HN: I combined Marc Lou's TrustMRR and IndiePage for free. I wanted it

https://myindie.space
1•sithu_khant•1h ago•0 comments

OpenAI agents attacked RubyGems before Hugging Face incident

https://www.reuters.com/legal/litigation/openai-agents-attacked-software-service-rubygems-before-...
2•01-_-•1h ago•0 comments

Does anyone run Postgres without PgBouncer?

https://www.brandur.org/fragments/postgres-without-pgbouncer
1•paperwhitez•1h ago•0 comments

Show HN: Don't Hit Send – the model answers while you type

https://github.com/scalattice/dont-hit-send
2•RomulusHill•1h ago•0 comments

Homotopy Type Theory – Univalent Foundations of Mathematics (2013)

https://hott.github.io/book/hott-online.pdf.html
2•peter_d_sherman•1h ago•1 comments

macOS defaults list: Incomplete list of macOS defaults commands with demos

https://macos-defaults.com
5•zdw•1h ago•0 comments

We blind-tested ChatGPT, Claude, and Gemini on 20 everyday tasks (Open Dataset)

https://dailyskill.ai/ai-benchmark-2026/
1•dubaimark•1h ago•1 comments

Maven Robotics wants to steal your robot deployment deal

https://techcrunch.com/2026/09/10/maven-robotics-wants-to-steal-your-robot-deployment-deal/
1•soltanov•1h ago•0 comments