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

Simplicity always wins:SOTA on swe-pro,tb2,-verif on 21 models with simple-agent

https://github.com/strands-labs/benchmark-harnesses
1•gaurav71531•1m ago•1 comments

Better Graph Database Ball

https://blog.ladybugdb.com/post/better-graph-database-ball/
1•eatonphil•1m ago•0 comments

Poll: What's your primary AI coding agent/orchestrator?

1•jacobgold•4m ago•0 comments

Windows 11 update broke the Recycle Bin, OneDrive, and your PC's stability

https://www.techspot.com/news/112831-microsoft-confirms-weird-recycle-bin-bug-windows-11.html
2•speckx•6m ago•0 comments

John Jumper leaves Google to join Anthropic

https://twitter.com/JohnJumperSci/status/2068001285173834106
2•artninja1988•6m ago•1 comments

Pavel Durov accuses Meta of sabotaging access in India with BGP hijacks

https://www.theregister.com/networks/2026/06/19/telegram-founder-accuses-meta-of-sabotaging-acces...
2•rndsignals•7m ago•0 comments

Show HN: Multiplayer Usage Tracking for Claude Code, Codex and OpenCode

https://github.com/useautumn/summer
1•johnyeocx•8m ago•0 comments

Just made an app and MCP Server to convert Markdown to Google Docs

1•baroiall•9m ago•0 comments

Deep learning reveals antimicrobial peptides within prions

https://www.nature.com/articles/s41564-026-02408-1
1•bookofjoe•10m ago•0 comments

We Liked Remote Work. Then We Looked at the Data.

https://www.nytimes.com/2026/06/17/opinion/remote-work-depression.html
3•nickv•10m ago•4 comments

Geopolitical jitters push Europe's internet registry from cloud-first strategy

https://www.theregister.com/networks/2026/06/19/geopolitical-jitters-push-europes-internet-regist...
1•Bender•10m ago•0 comments

Five Things the "Nuke Bros" Don't Want You to Know About Small Modular Reactors

https://blog.ucs.org/edwin-lyman/five-things-the-nuclear-bros-dont-want-you-to-know-about-small-m...
2•cratermoon•10m ago•1 comments

Iconic Twin Cities rapper Eyedea finds new life with AI-generated album

https://www.cbsnews.com/minnesota/news/eyedea-ai-twin-cities-hip-hop-album/
2•NDlurker•10m ago•0 comments

Marktide – Performant HTML to Markdown for Python

https://github.com/zocomputer/marktide
1•benzguo•11m ago•0 comments

Microsoft discovers new lightweight backdoor that steals cryptocurrency

https://arstechnica.com/security/2026/06/microsoft-spots-new-self-propagating-malware-for-stealin...
3•Bender•12m ago•0 comments

Rebuild begins at Blue Origin launch pad; Relativity targets Mars

https://arstechnica.com/space/2026/06/rocket-report-rebuild-begins-at-blue-origin-launch-pad-rela...
2•Bender•12m ago•0 comments

Ask HN: What is the coolest tech progress outside AI?

4•vantareed•12m ago•0 comments

Mate-Selection and the Dark Triad

https://ink.library.smu.edu.sg/cgi/viewcontent.cgi?article=2384&context=soss_research
2•jruohonen•15m ago•0 comments

Show HN: Open-source Antigravity plugin for Claude Code

https://simplybychris.github.io/antigravity-plugin-cc/
2•simplybychris•17m ago•0 comments

Hospitals serving Medicaid patients prepare to take payment caps on the chin

https://healthexec.com/topics/healthcare-management/healthcare-policy/medicaid-state-directed-pay...
3•petethomas•17m ago•0 comments

Conway's Game of Life in Pure SQL

https://www.dbpro.app/blog/game-of-life-in-pure-sql
2•upmostly•17m ago•0 comments

Ask HN: How do you get feedback for beta apps

2•totaldude87•18m ago•0 comments

Learning to Program with the Cybiko Handheld Computer Using B2C

https://pic.hallikainen.org/techref/cybiko/b2c/ch1.htm
2•ForHackernews•20m ago•0 comments

LLM Quantization Project Part 1: What Even Is an LLM?

https://www.lttlabs.com/articles/2026/06/19/llm-quantization-part-1-what-even-is-an-llm
3•LabsLucas•23m ago•1 comments

Everything's bigger and better in Texas – even data breaches

https://www.theregister.com/security/2026/06/19/texas-gov-vendor-breach-exposes-data-of-3m-hunter...
2•jruohonen•24m ago•0 comments

APT28, an Evolution of Tradecraft

https://blog.sekoia.io/apt28-an-evolution-of-tradecraft/
2•mooreds•25m ago•0 comments

A New Bill Takes Aim at Government Pressure to Silence Lawful Online Speech

https://www.eff.org/deeplinks/2026/06/new-bill-takes-aim-government-pressure-silence-lawful-onlin...
18•hn_acker•25m ago•5 comments

Court Records Should Be Free

https://www.eff.org/deeplinks/2026/06/court-records-should-be-free
5•hn_acker•25m ago•1 comments

Weil reportedly pays up to $20M after hackers steal client data

https://www.legalcheek.com/2026/06/weil-reportedly-pays-up-to-20-million-after-hackers-steal-clie...
2•mooreds•25m ago•0 comments

A space telescope is falling out of space. NASA has a plan to save it

https://www.space.com/space-exploration/launches-spacecraft/no-one-thought-it-was-going-to-be-pos...
2•speckx•25m ago•0 comments