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

Jeff Bezos Wants to Build an 'Artificial General Engineer'

https://www.nytimes.com/2026/06/11/technology/bezos-prometheus-ai-engineer.html
1•momentmaker•49s ago•0 comments

Software Is Made Between Commits

https://zed.dev/blog/introducing-deltadb
1•jeremy_k•1m ago•0 comments

The Agentic Team Manifesto

https://github.com/grothkopp/agentic-team-manifesto
1•growt•2m ago•0 comments

Ask HN: Agents get dumber before release of new model version?

1•sporkland•2m ago•0 comments

Show HN: Private image and PDF tools that run in the browser

https://photovoid.com/en/
1•thegamer•3m ago•0 comments

Agent doesn't remember your codebase (dupehound)

https://medium.com/@rafael_pinheiro/your-agent-doesnt-remember-your-codebase-dupehound-e2090a7c28bd
2•rafaepta•3m ago•0 comments

Steve Jobs' Love of Simplicity Fueled a Design Revolution

https://www.smithsonianmag.com/arts-culture/how-steve-jobs-love-of-simplicity-fueled-a-design-rev...
1•thunderbong•5m ago•0 comments

The Risk Isn't Rogue AI. It's Plausible AI

https://grith.ai/blog/real-risk-isnt-rogue-ai-plausible-ai
2•edf13•6m ago•0 comments

Anthropic vs. OpenAI: Behind the bitter battle for the future of AI

https://www.reuters.com/legal/transactional/anthropic-v-openai-behind-bitter-battle-future-ai-202...
1•onemoresoop•6m ago•0 comments

Show HN: React Library for Datacentres

https://react-networks-lib.rackout.net/racks
1•matt-p•8m ago•0 comments

Redline: The Universal Reaction Budget

https://travislwatson.com/redline.html
1•airhangerf15•11m ago•0 comments

Show HN: Stonn, a federated civil/terrain viewer

https://stonn3d.com/
1•oscarcp•12m ago•0 comments

The Most AI-Friendly UI Frameworks – Summer 2026

https://twitter.com/sethltx/status/2065105437750337910
2•sethlivingston•12m ago•0 comments

The current impact of AI on engineering velocity

https://newsletter.getdx.com/p/the-current-impact-of-ai-on-engineering
1•gmays•14m ago•0 comments

NASA's X-59 Aircraft Flies Supersonic for First Time

https://www.nasa.gov/aeronautics/x-59-first-supersonic-flight/
2•woodwireandfood•14m ago•0 comments

Windows 1.0 and the WinAPI, 40 Years Later

https://medium.com/@stassaf.uae/windows-1-0-and-the-winapi-40-years-later-abaf64832918
2•jhack•14m ago•0 comments

Claude Fable 5 costs $10/$50M tokens – what that means in production

https://costlens.dev/blog/claude-fable-5-pricing-production-costs
1•j_filipe•14m ago•1 comments

The Fonts of the U.S. Federal Courts

https://daringfireball.net/2026/05/the_fonts_of_the_us_federal_courts
2•rayiner•15m ago•0 comments

Solar generates more energy in US than coal for first time

https://www.theguardian.com/us-news/2026/jun/11/solar-energy-us-coal
26•neilfrndes•19m ago•3 comments

Introducing Waymo Premier, an elevated rider experience

https://waymo.com/blog/2026/06/waymo-premier/
4•boulos•19m ago•1 comments

Fable on Humanity

https://twitter.com/MathiasChu/status/2064493902271262809
1•jger15•19m ago•0 comments

Herzog and de Meuron transforms mountain antenna tower into "iconic sculpture"

https://www.dezeen.com/2026/06/11/herzog-de-meuron-titlis-tower/
2•johanam•21m ago•0 comments

Build a Basic AI Agent from Scratch

https://www.ruxu.dev/articles/ai/build-a-basic-ai-agent/
1•scapecast•21m ago•0 comments

Self-Harness: Harnesses That Improve Themselves

https://arxiv.org/abs/2606.09498
2•0xkvyb•23m ago•1 comments

Show HN: Basepanel, a Postgres, MySQL, and SQLite Editor for iOS and Android

https://www.basepanel.com/
1•rc318•24m ago•0 comments

.NET 11 Preview 5 is now available

https://devblogs.microsoft.com/dotnet/dotnet-11-preview-5/
1•Fervicus•26m ago•0 comments

The RCE that AMD wouldn't fix

https://mrbruh.com/amd2/
13•MrBruh•26m ago•5 comments

Claude Fable 5: mid-tier results on coding tasks

https://www.endorlabs.com/learn/claude-fable-5-mythos-grade-hype
2•bugvader•26m ago•0 comments

How the Heck Do Traffic Lights Work?

https://perthirtysix.com/how-the-heck-do-traffic-lights-work
2•gmays•27m ago•0 comments

Single File Virtualenv-Native Sandboxed Python Execution Environment

https://github.com/nzjrs/sandbubble
1•nzjrs•28m ago•1 comments