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

World Cup 26 Goal Map

https://a-maherr.github.io/wc2026-goalmap/
1•jonbaer•1m ago•0 comments

Why the U.S. Uses Only Half of Its Grid Capacity

https://spectrum.ieee.org/united-states-power-grid-capacity
1•Brajeshwar•1m ago•0 comments

Scaling Rails for a Peak Load of 41M Requests/Hour

https://andyatkinson.com/how-aura-frames-scales-for-peak-load-ruby-on-rails
1•knappe•1m ago•0 comments

Why someone switched from Wiki.js to my Go wiki and started sponsoring it

https://leafwiki.com/blog/a-beer-a-go-binary-and-a-wiki/
1•perber•2m ago•0 comments

Backblaze Announces Five-Year Multi-Exabyte Agreement with CoreWeave

https://www.businesswire.com/news/home/20260622788628/en/Backblaze-Announces-Five-Year-Multi-Exab...
2•mangogogo•3m ago•0 comments

Netanyahu, Trump planned Iran strike far in advance, ran deception campaign

https://www.timesofisrael.com/report-netanyahu-trump-planned-iran-strike-far-in-advance-ran-decep...
2•like_any_other•3m ago•0 comments

Phase Bit Retention (Ion) 99.54%

https://z6.oooooooooo.se
1•mbinatorom•4m ago•0 comments

Illinois' Social Media Tax Is a Modern Stamp Act – and Just as Doomed

https://www.techdirt.com/2026/06/23/illinois-social-media-tax-is-a-modern-stamp-act-and-just-as-d...
1•hn_acker•5m ago•0 comments

Utah Is Testing Out AI Doctors–and Actual Doctors Aren't Happy About It

https://www.wsj.com/health/healthcare/ai-doctors-utah-374653c8
3•speckx•6m ago•0 comments

Does This Radio Host Know Everyone in Wales?

https://www.nytimes.com/2026/06/22/world/europe/elis-james-wales-radio.html
1•reaperducer•7m ago•0 comments

Nobody trusted our internal dashboards, so we moved them to code

https://ably.com/blog/dashboards-as-code
1•jnewcomb•9m ago•0 comments

OpenMontage: Open-source, agentic video production system

https://github.com/calesthio/OpenMontage
4•vantareed•10m ago•1 comments

Syrian Subsea Cable Link Downed in Latest Act of Telecom Sabotage

https://www.kentik.com/blog/syrian-subsea-cable-link-downed-in-latest-act-of-telecom-sabotage/
1•oavioklein•10m ago•0 comments

I Got an Investor Check Through Cold LinkedIn Outreach

https://try.wayy.ai/cold-outreach-fundraising-ai-startups-wayy
1•TrueCare24•10m ago•0 comments

The Overnight Test

https://plud.net/the-overnight-test
1•anonfunction•13m ago•0 comments

Years without fluoridated water show pattern of tooth decay experts warned about

https://www.cbc.ca/news/canada/new-brunswick/years-without-fluoridated-water-shows-pattern-of-too...
1•Teever•13m ago•0 comments

The Observability Stack That Makes Datadog Look Absurd at Scale

https://medium.com/@amaan2000mohd/clickstack-the-observability-stack-that-makes-datadog-look-absu...
1•karlmush•14m ago•0 comments

Scam Jobs Are Genuinely Disgusting

https://dartrivity.bearblog.dev/these-scam-jobs-are-genuinely-disgusting/
3•speckx•18m ago•0 comments

Show HN: Caplets - Give your agent capabilities, not giant tool walls

https://caplets.dev
2•ianpascoe•18m ago•0 comments

How to block Reddit posts linking to a specific URL

https://blog.willchatham.com/2026/06/19/how-to-block-reddit-posts-linking-to-a-specific-url/
2•speckx•18m ago•0 comments

Why Traditional Testing Doesn't Work for AI Applications

https://kig.re/2026/06/22/writing-evals-for-ai-powered-apps.html
2•kigster•19m ago•0 comments

The worthlessness of Vitamin D is mildly exaggerated

https://dynomight.net/vitamin-d/
2•surprisetalk•19m ago•0 comments

Ask HN: What do you care about? What is your joy and purpose?

4•aurenvale•19m ago•1 comments

CloudCruise Is GA Now

https://twitter.com/adrmtu/status/2069431889983885345
4•adrmtu•20m ago•0 comments

Find the questions your RAG pipeline will fail on, before your users do

https://github.com/rishavsunny12/ragProbe
3•rishavsunny12•20m ago•0 comments

Digital euro clears key hurdle as EU seeks to break free from U.S. credit cards

https://finance.yahoo.com/markets/currencies/articles/ecb-secures-key-parliamentary-backing-10271...
8•madars•21m ago•0 comments

I built Mosaic – an infinite spatial canvas client for AI chats

https://github.com/versus184-py/Mosaic
2•versus184•22m ago•0 comments

SEC Form F-1 Bending Spoons SPA

https://www.sec.gov/Archives/edgar/data/2004711/000110465926071170/tm2613674-7_f1.htm
2•monkeydust•23m ago•0 comments

Show HN: CUDA Profiler for Production Inference

https://github.com/graphsignal/graphsignal-profiler
5•npgraph•24m ago•0 comments

Chronicle of a Disaster Foretold

https://www.newyorker.com/magazine/2026/07/06/chronicle-of-a-disaster-foretold
2•petethomas•26m ago•0 comments