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

React Interview Questions Every Developer Should Know in 2026

https://jsdev.space/react-interview-questions-2026/
1•javatuts•1m ago•0 comments

Stop reaching for microservices. You are not Netflix

https://diogocapela.com/blog/stop-reaching-for-microservices-you-are-not-netflix
2•rvz•4m ago•0 comments

Wah-Ult in the Vault

https://www.nature.com/articles/d41586-026-01719-x
1•ilreb•4m ago•0 comments

A Chinese Android just ran a half-marathon faster than any human

https://www.cnn.com/2026/04/19/china/china-robot-half-marathon-intl-hnk
1•ilreb•5m ago•0 comments

Cheaper LLM tokens led to bigger AI bills (Jevons paradox)

https://northwoodsystems.ai/blog/ai-token-economics
1•AndrewLiu96•5m ago•0 comments

Deep Work Plan – Turn a repo into a spec-driven harness for AI agents

https://deepworkplan.com/
1•xergioalex•6m ago•0 comments

€31B drug trade, 7,600 deaths: How the EU plans to tackle the drug crisis

https://www.euronews.com/my-europe/2026/06/16/31bn-drug-trade-7600-deaths-how-the-eu-plans-to-tac...
1•rawgabbit•8m ago•0 comments

AWS Blocks – build AWS apps locally before deploying

https://aws.amazon.com/products/developer-tools/blocks/
1•xyos•8m ago•1 comments

BareMetal OS running inside Firecracker microVMs with <1ms cold start

https://github.com/ReturnInfinity/BareMetal-Firecracker
1•ianseyler•9m ago•1 comments

Function Composition from C++17 to C++23

https://freshsources.com/code-capsules/composing-functions/
1•chuckallison•11m ago•1 comments

Show HN: Kaupang – a push-based deploy CLI, now with a drag-and-drop builder

https://github.com/kaupang-dev/kaupang
1•witnz•11m ago•0 comments

The engineering practices Claude Code and Codex use to improve AI agents

https://www.andrewjesson.com/blog/the-engineering-practices-claude-code-and-codex-use-to-improve-...
1•anndvision•12m ago•0 comments

Git worktrees – why should I use them?

https://github.blog/ai-and-ml/github-copilot/what-are-git-worktrees-and-why-should-i-use-them/
1•onnnon•12m ago•0 comments

Databricks Iceberg Support Has a Catch. It's Called Unity Catalog

https://www.onehouse.ai/blog/databricks-iceberg-support-has-a-catch-its-called-unity-catalog
1•LexSiga•13m ago•0 comments

Show HN: Yet Another News Reader

https://boomerang-news.com
1•messel•14m ago•0 comments

GitHub Action to grade OpenAPI schema quality (A–F) and catch breaking changes

https://github.com/marketplace/actions/typemorph-schema-check
1•jop00004•16m ago•0 comments

Lords urgent question on the suspension of Anthropic's AI models [video]

https://www.youtube.com/watch?v=1Dw_k_Bs95A
1•haritha-j•16m ago•0 comments

HPE Discover 2026 Keynote Coverage

https://www.servethehome.com/hpe-discover-2026-keynote-coverage/
1•ksec•17m ago•1 comments

CLI AI Tool Laucher

https://github.com/tjbmoose09/ai-tool-launcher
2•tjbmoose09•19m ago•1 comments

Show HN: Multiplayer Space Game

https://voidhorizon.net
1•messel•20m ago•0 comments

Writing an echo server in libev and C++ (2011)

https://www.skitoy.com/posts/writing-an-echo-server-in-libev-and-c/
1•mooreds•21m ago•0 comments

Using the stars and paddles, indigenous Taiwanese recreate risky sea journey

https://www.cnn.com/2026/06/17/asia/taiwan-indigenous-paddle-philippines-intl-hnk
1•mooreds•21m ago•0 comments

El Niño is here, so what does it mean?

https://text.npr.org/g-s1-128448
1•mooreds•21m ago•0 comments

What is a data semantic layer?

https://getbruin.com/blog/what-is-a-semantic-layer/
1•arsalann•22m ago•0 comments

"How dare we use something like that..." – Why generative AI artwork is a no...

https://www.gamesindustry.biz/how-dare-we-use-something-like-that-on-someones-dream-why-generativ...
1•dude250711•22m ago•0 comments

Private Tap-to-Pay

https://walt.is
1•627467•23m ago•0 comments

Denmark desperately needs more inequality

https://world.hey.com/dhh/denmark-desperately-needs-more-inequality-8e84a8d0
4•peterspath•23m ago•0 comments

How to make LVT politically doable

https://wilsoniumite.com/2026/06/17/how-to-make-lvt-politically-doable/
2•Wilsoniumite•23m ago•0 comments

Show HN: Noject – menubar app to stop drive ejections on macOS

https://scaleninja.com/noject/
2•rohityadavcloud•25m ago•0 comments

Cosmodial Sky Atlas

https://frankforce.com/cosmodial-sky-atlas/
1•surprisetalk•25m ago•0 comments