frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Which function definition keyword do you prefer, def or fn?

1•winwang•12mo 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•12mo 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•12mo 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•12mo 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•12mo ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•12mo ago
Agreed

Xkcd.com/435: Purity

https://www.explainxkcd.com/wiki/index.php/435:_Purity
1•o4c•2m ago•0 comments

AI in the Breach: How an Adversary Leveraged AI to Target a Water Utility's OT

https://www.dragos.com/blog/ai-assisted-ics-attack-water-utility
1•_____k•4m ago•0 comments

Event Calendar from Newsletters

https://nowsletter.org/
1•jolosos•6m ago•1 comments

Anon: Extrapolating Adaptivity Beyond SGD and Adam

https://anonymous.4open.science/api/repo/Anon-6511/file/README.md
1•pilooch•7m ago•0 comments

Tell HN: IBM BPM cloud is down

1•laurensr•10m ago•0 comments

Algorithmic Framework Is Discovering Novel Chip Designs Never Invented Before

https://viterbischool.usc.edu/news/2026/05/this-algorithmic-framework-is-discovering-novel-chip-d...
1•giuliomagnifico•11m ago•0 comments

KLM flight attendant hospitalized after contact with hantavirus

https://nltimes.nl/2026/05/07/klm-flight-attendant-hospitalized-contact-hantavirus-cruise-ship-pa...
2•TechTechTech•11m ago•0 comments

Show HN: LaoTzu Writer Studio

1•homeonthemtn•12m ago•0 comments

Anthropic strikes SpaceX data center deal as it plows ahead on AI coding

https://www.reuters.com/business/retail-consumer/anthropic-unveils-dreaming-feature-help-its-ai-a...
2•andsoitis•13m ago•0 comments

Show HN: Bliss – a backlog quality scanner for AI-powered teams

https://trybliss.io/
2•nitzano•14m ago•0 comments

Package Darwinism, the Furture of Open Source, Adapt or Get Archived

https://twitter.com/pelaseyed/status/2052345682984407067
1•homanp•14m ago•0 comments

Anthropic Gets in Bed with SpaceX

https://www.wired.com/story/anthropic-spacex-compute-deal-colossus/
2•andsoitis•14m ago•0 comments

Coding Agent Harness Comparison 2026: Claude Code, Codex, Amp

https://techstackups.com/comparisons/coding-agent-harness-comparison-2026/
1•ritzaco•14m ago•0 comments

Anthropic, SpaceX announce compute deal that includes space development

https://www.cnbc.com/2026/05/06/anthropic-spacex-data-center-capacity.html
1•andsoitis•15m ago•0 comments

Chasing AI Memory SOTA: Beating the Benchmark, Missing the Point

https://xmemory.ai/chasing-sota-in-ai-memory/
1•alex_petrov•17m ago•1 comments

Show HN: Review code changes in a terminal and share with your coding agent

https://github.com/alexfedosov/diffnotes
1•alex_x•19m ago•0 comments

I forget most of what I read, so I built an AI to quiz me on it

https://refresherai.com/
1•go-native•19m ago•1 comments

Bariatric surgery procedures fall below 200k, first time since 2020

https://medicalxpress.com/news/2026-05-bariatric-surgery-procedures-fall.html
2•PaulHoule•24m ago•0 comments

Red, White, and Psychedelic

https://hollisrobbinsanecdotal.substack.com/p/red-white-and-psychedelic
1•HR01•25m ago•0 comments

Mizar: The first usable proof assistant for mathematics

https://lawrencecpaulson.github.io//2026/05/07/Mizar.html
1•chmaynard•28m ago•0 comments

Denmark's state-run postal service will no longer deliver letters (2025)

https://apnews.com/article/postnord-denmark-postal-service-mail-ce78db2f2234a50e676063fac790a617
2•donohoe•31m ago•0 comments

Guide for Migrarting from Radix UI to Base UI

https://shadcnstudio.com/blog/migrate-from-radix-ui-to-base-ui
1•devsoul•32m ago•0 comments

Grand Theft Oil Futures: Insider traders keep making a killing at our expense

https://paulkrugman.substack.com/p/grand-theft-oil-futures
2•Qem•33m ago•0 comments

How the oilman's president boosted a green transition

https://www.ft.com/content/a55fb3cb-2b04-4608-9b96-6544e8b803df
1•doener•33m ago•0 comments

LinkedIn profile visitor lists belong to the people, says Noyb

https://www.theregister.com/offbeat/2026/05/05/noyb-cries-foul-on-linkedin-withholding-profile-vi...
7•robin_reala•34m ago•2 comments

I built a free GPT to test whether an idea is clear before launch

https://chatgpt.com/g/g-69f11b6a1bdc8191ab1100acf60f40cc-deltdx-free
1•DELTAX-Editions•36m ago•0 comments

Godot Usage and Engine Growth

https://godotengine.org/article/godot-growth-stats-2026/
2•__natty__•39m ago•0 comments

Practical Effect Handlers in Capability-Passing Style

https://link.springer.com/chapter/10.1007/978-3-030-83128-8_3
1•noelwelsh•40m ago•1 comments

Idempotency Is Easy Until the Second Request Is Different

https://blog.dochia.dev/blog/idempotency/
2•ludovicianul•41m ago•0 comments

Show HN: AICW Video open-source to cut video into clips with captions, voiceover

https://github.com/aicw-io/aicw-video
1•eummm•44m ago•0 comments