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

I built a notes app powered by the model that powers Apple Intelligence

https://apps.apple.com/us/app/fog-on-device-ai-notes/id6760272134
1•akshatsaladi•31s ago•1 comments

Ask HN: What was the last thing you built on Fable 5

1•ddmma•3m ago•0 comments

In the Matter of OpenAI vs. LangGraph (2025)

https://www.latent.space/p/oai-v-langgraph
1•mooreds•4m ago•0 comments

DOJ Lawyers Argue xAI Is 'Vital' for National Security in NAACP Lawsuit

https://www.wired.com/story/doj-lawyers-argue-xai-vital-national-security-naacp-lawsuit/
1•ilreb•4m ago•0 comments

EU AI: the fables we told ourselves

https://pleias.ai/blog/fable-eu
1•mooreds•5m ago•0 comments

ShopFoundry – Turn Etsy listings into better titles, tags and descriptions

https://www.shopfoundry.app/
1•daisyjin•6m ago•0 comments

Distro Fighter game: Find your Linux distro and desktop

https://distrofighter.com/
2•ashitlerferad•17m ago•0 comments

Age Verification in Monolith OS

https://monolith-project.org/blog/age-verification/
1•rickcarlino•19m ago•0 comments

Safety Ideas, and a Testable Path

1•GrizzlyMedicine•24m ago•0 comments

AI efficiency gains come at a high energy cost

https://www.ft.com/content/7f1c81ac-775b-4f52-a650-7804e4734d5b
1•1vuio0pswjnm7•26m ago•0 comments

Predictive Data Debugging: Reveal and Shape What Models Learn Before You Train

https://www.goodfire.ai/research/predictive-data-debugging
1•gmays•27m ago•0 comments

Frederic Tudor

https://en.wikipedia.org/wiki/Frederic_Tudor
3•thunderbong•27m ago•0 comments

How Many Elementary Particles Are There, Really?

https://www.quantamagazine.org/how-many-elementary-particles-are-there-really-20260615/
1•ProAm•29m ago•0 comments

Hardest IT roles to fill in 2026 and what's changed

https://www.cio.com/article/4184685/the-11-hardest-it-roles-to-fill-in-2026-and-whats-changed.html
3•WaitWaitWha•31m ago•0 comments

Leaked from Russia: 18 Videos of the Fuel Crisis Growing Fast [video]

https://www.youtube.com/watch?v=yIj3CLqsOXs
1•consumer451•33m ago•0 comments

A weekly read on the US hay market

https://haywireag.com/
2•mooreds•33m ago•0 comments

Microsoft turns to AWS as GitHub faces AI capacity crunch

https://runtimewire.com/article/microsoft-github-aws-ai-capacity-crunch
45•ilreb•33m ago•8 comments

Anthropic Sued over Alleged False Advertising on Claude Max Subscription Limits

https://www.cnet.com/tech/services-and-software/anthropic-sued-alleged-false-advertising-claude-m...
2•SilverElfin•33m ago•0 comments

6th Finger Project (2022) [video]

https://www.youtube.com/watch?v=232jn-Vu6Rk
1•nivethan•35m ago•0 comments

Australia to probe assault claims by Gaza flotilla activists against Israeli[..]

https://www.bbc.com/news/articles/clyx4eny41zo
2•grugagag•35m ago•0 comments

Library

https://benbrown.com/library/
1•toomuchtodo•36m ago•1 comments

San Andreas fault reaches highest stress level in 1k years

https://mauinow.com/2026/06/15/san-andreas-fault-reaches-highest-stress-level-in-1000-years/
2•harambae•37m ago•0 comments

Microsoft Teams introduces office attendance tracking via Wi-Fi

https://www.pcworld.com/article/3165894/from-this-month-onwards-this-microsoft-programme-will-be-...
5•ilreb•37m ago•0 comments

Vance: Iran can have access to $300B reconstruction fund

https://thehill.com/homenews/administration/5924963-vance-iran-300b-reconstruction-fund/
3•GreenSalem•38m ago•2 comments

Woodrow Wilson: America's worst president for free speech

https://expression.fire.org/p/woodrow-wilson-americas-worst-president
4•iamnothere•39m ago•0 comments

The Talk Show: Live from WWDC 2026 [video]

https://www.youtube.com/watch?v=OtRgxqMuUY8
1•Austin_Conlon•47m ago•0 comments

SpaceX IPO leaves retail investors too few shares, tough hold-or-sell decision

https://www.cnbc.com/2026/06/15/spacex-ipo-leaves-retail-investors-with-too-few-shares-and-a-toug...
1•1vuio0pswjnm7•51m ago•0 comments

US Government warned Anthropic Fable was jailbroken, but firm 'refused' to fix

https://www.tomshardware.com/tech-industry/artificial-intelligence/trump-adviser-david-sacks-says...
3•frankacter•52m ago•1 comments

Our docs are shit and we're bad at teaching

https://deadsimpletech.com/blog/docs-shit-bad-at-teaching
1•cratermoon•53m ago•0 comments

Florida sues TikTok, claiming it violates state child safety law

https://www.reuters.com/legal/government/florida-sues-tiktok-claiming-it-violates-state-child-saf...
2•1vuio0pswjnm7•55m ago•0 comments