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

The Company Founder Who Got Fired for Ignoring His Own Return-to-Office Rules

https://www.wsj.com/business/the-founder-who-got-fired-for-ignoring-his-own-return-to-office-rule...
1•berkeleyjunk•5m ago•0 comments

Show HN: Meon – declarative flat-parsing engine (SoA, no AST)

https://github.com/vgnapuga/meon
1•vgnapuga•8m ago•0 comments

Show HN: Aletheia – The Uncertainty Loop Agent for Claude Code and Codex

https://github.com/nsankar/Aletheia
1•sankarn_ai•9m ago•0 comments

Engram – persistent memory for AI agents, in-process, no cloud

https://github.com/HBarefoot/engram
2•barefootdifital•15m ago•0 comments

Moving Back Home Used to Be a Sign of Failure. Now It Shows Financial Savvy

https://www.wsj.com/lifestyle/relationships/living-with-parents-finances-0c35530c
2•apparent•17m ago•0 comments

Cursed Gemstones – The Koh-I-Noor Diamond

https://www.vulcans-forge.com/blog/news/cursed-gemstones-the-koh-i-noor-diamond
3•thunderbong•18m ago•0 comments

Longcat

https://longc.at/longcat.html
11•willmeyers•18m ago•0 comments

Istota – a multi-user AI agent and personal OS

https://istota.cynium.com/
5•durakot•19m ago•0 comments

The Computers Used in Movies

https://www.starringthecomputer.com/computers.html
8•gitowiec•19m ago•2 comments

SOLAR: AI-Powered Speed-of-Light Performance Analysis

https://arxiv.org/abs/2606.26383
2•matt_d•23m ago•0 comments

Taphonomic analysis reveals behavioral & tech capabilities of Homo floresiensis

https://www.science.org/doi/10.1126/sciadv.aeb7219
2•bushwart•24m ago•0 comments

Show HN: Goldseam – heal broken Cypress selectors with a local LLM

https://github.com/adam-s/goldseam
2•dataviz1000•25m ago•0 comments

WSL Keeps Getting Better

https://www.xda-developers.com/wsl-keeps-getting-better-and-its-because-microsoft-is-finally-admi...
3•porridgeraisin•25m ago•1 comments

Show HN: Detecting AI slop with regex and Stephen King

https://github.com/guy-lifshitz/tacheles
2•shtofadhor•26m ago•0 comments

Why High-Earning Families Are Leaving Traditional Schools for AI

https://allk12.com/blog/why-high-earning-families-are-leaving-traditional-schools-for-ai
2•misterinfo•26m ago•0 comments

How Bending Spoons built a $23B tech empire from struggling brands

https://www.ft.com/content/040aac86-f458-400b-a353-7ff2ee5aa34f
2•chuckus•26m ago•1 comments

Dead Man's Switch and USB Kill Switch for Linux, Security Project

https://github.com/qxnode/luks-deadman
2•qxnode•28m ago•0 comments

Neoengineers

https://elijahpotter.dev/articles/neoengineers
2•chilipepperhott•30m ago•0 comments

Show HN: EdgeRunner – run GGUF models with Swift and Metal

https://github.com/christopherkarani/EdgeRunner
2•karc14•31m ago•0 comments

Plastic Free July Is Nonsense

https://bekopcho.substack.com/p/plastic-free-july-is-nonsense
3•clemesha•31m ago•0 comments

Handoff – a verified context bridge between Claude Code sessions

https://github.com/ostikwhy-blip/claude-code-handoff-skill
2•ostik•34m ago•0 comments

The Verification Horizon: No Silver Bullet for Coding Agent Rewards

https://arxiv.org/abs/2606.26300
2•matt_d•34m ago•0 comments

Nutrition Science's Most Preposterous Result

https://www.theatlantic.com/magazine/archive/2023/05/ice-cream-bad-for-you-health-study/673487/
2•paulpauper•35m ago•0 comments

Falling fertility on the left as key driver of US birth decline

https://www.nature.com/articles/s41598-026-57582-3
4•paulpauper•36m ago•0 comments

Is America Moving Left Economically?

https://hereticalinsights.substack.com/p/is-america-moving-left-economically
1•paulpauper•36m ago•1 comments

Show HN: I hated how much my 12-year-old played Roblox, so we built our own FPS

https://cooked.house
2•davitb•37m ago•0 comments

Orchestra Locks Horns with Copyright Cops over Works by Long-Dead Composers

https://www.wsj.com/arts-culture/music/orchestra-locks-horns-with-copyright-cops-over-works-by-lo...
2•impish9208•38m ago•1 comments

Combustion Engine Web-Based Simulator

https://combustionlab.net
1•mytuny•40m ago•0 comments

"These cameras are just like the Eye of Sauron"

https://arxiv.org/abs/2602.09239
16•dijksterhuis•46m ago•0 comments

Mark Zuckerberg tells staff that AI agents haven't progressed enough

https://techcrunch.com/2026/07/02/mark-zuckerberg-tells-staff-that-ai-agents-havent-progressed-as...
23•msolujic•46m ago•8 comments