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

Ultrafine Particles: Global Study Attributes Nearly 2M Premature Deaths a Year

https://www.mpic.de/6028365/ultrafine-particles-in-the-air
1•hn_acker•31s ago•1 comments

Ask HN: How would you learn AI-assisted development from the ground up?

1•SMAAART•1m ago•0 comments

Open and Shut

https://www.argmin.net/p/open-and-shut
1•_delirium•1m ago•0 comments

Web-AI-SDK Playground for browser-native AI agents

https://web-ai-sdk.dev/playground/
1•obetomuniz•2m ago•1 comments

Apple should be ashamed of its hostile App Store rating system

https://lapcatsoftware.com/articles/2026/7/14.html
2•zdw•3m ago•0 comments

DoorDash Takes to the Sky with Its Own Drones

https://www.wsj.com/logistics-report/doordash-takes-to-the-sky-with-its-own-drones-0cc8658d
1•petethomas•3m ago•0 comments

Everywhere Foist Upon Us

https://darthmall.net/2026/everywhere-foist-upon-us/
2•speckx•3m ago•0 comments

Show HN: AI that opens PRs on your repo to fix your SEO

https://zaatar.ai/
2•olivdums•5m ago•0 comments

Four Competing AIs Answer 1 Classic Question

2•notsydonia•6m ago•0 comments

Show HN: OnlyVibes – No Fuss Realtime Interviews

https://onlyvibes.cc
2•stagas•6m ago•0 comments

What screen time does to children's brains is more complicated than it seems

https://www.bbc.com/news/articles/c9d0l40v551o
2•bookofjoe•7m ago•0 comments

Gemini for macOS adds new natural language capabilities

https://blog.google/innovation-and-ai/products/gemini-app/speak-naturally-gemini-app-mac-os/
2•smokeeaasd•7m ago•0 comments

Secure Your APIs: OAuth2 and JWT for Beginners

https://blog.jetbrains.com/kotlin/2026/07/secure-your-apis-oauth2-and-jwt-for-beginners/
2•smokeeaasd•8m ago•0 comments

Lucia, Arctic and Oslo have been deprecated

https://pilcrowonpaper.com/blog/18
2•JustSkyfall•8m ago•0 comments

The Scientific Literature Is Poisonous to LLMs

https://www.reinvent.science/p/the-scientific-literature-is-poisonous
6•surprisetalk•9m ago•0 comments

Possible arbitrary file read and remote code execution in Active Storage

https://github.com/rails/rails/security/advisories/GHSA-xr9x-r78c-5hrm
2•tenderlove•9m ago•0 comments

Steve Jobs Demoing Core Animation at WWDC 2007

https://twitter.com/lucaslovexoxo/status/2082098579632783441
2•ksec•10m ago•0 comments

AI Doomsday Bullshit Is Getting Tired

https://karlbode.com/ai-doomsday-bullshit-is-getting-tired/
3•cdrnsf•10m ago•0 comments

I FELL 15,000 FEET AND Lived (2009)

https://uss-la-ca135.org/60/1960Judkins-Knott.html
2•downbad_•11m ago•0 comments

Americans say large tech companies have too much power

https://www.axios.com/2026/07/29/little-tech-big-tech-americans-power
2•thisislife2•11m ago•0 comments

Show HN: Parse a PDF from your terminal with PaddleOCR-VL-1.6

https://github.com/eigenpal/openparser
5•TimurKramar•11m ago•0 comments

Pangram raises $9M to detect AI content

https://techcrunch.com/2026/07/29/as-ai-content-floods-the-internet-pangram-raises-9m-to-detect-it/
2•andrewstetsenko•12m ago•0 comments

Show HN: Extra Headroom – cut Claude Code and Codex token costs by ~50%

https://extraheadroom.com/
2•gghootch•14m ago•0 comments

Are Kalshi MLB Game Winner Prices Accurate?

https://www.zhinit.dev/blog/mlb_game_winners_analysis
4•zhinit•16m ago•0 comments

The 10x Engineer Fallacy

2•shuntz•16m ago•0 comments

ACR, a local-first AI orchestration runtime (memory, skills, agents

https://github.com/hbkdad/arc
2•hbkcustoms•16m ago•0 comments

AI writes code that breaks main half as often

https://mergify.com/reports/state-of-merge-queues-2026
2•guerby•16m ago•0 comments

J-Lens for video models: uncovering steerable physical dynamics

https://blocket-league.vercel.app/
2•_jayhack_•17m ago•0 comments

Show HN: A detailed air alert map of Ukraine and Russia, built on free tier

https://uavradar.live/
3•uavattacks•18m ago•0 comments

Cesium DevCon 2026 talks are up, including a keynote from SQLite's creator

https://cesium.com/events/cesium-developer-conference/2026/
3•jasteinerman•19m ago•0 comments