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

Noctambulist is back the summer vacation is over

1•j0hnsm1th•1m ago•0 comments

We are causing sycophancy and evasion

https://www.unite.ai/ai-safety-psychology-trauma-framework-model-behavior/
1•lokatewry•3m ago•0 comments

German industry pushes to restore 40-hour working week without extra pay

https://www.ft.com/content/76a9c61b-021f-482d-8978-6480e9ba23e8
1•alephnerd•3m ago•1 comments

Offpunk Manifesto

https://blog.ayom.media/ideiasdechirico/offpunk-manifesto
1•yu3zhou4•6m ago•0 comments

Oh-My-Openagent

https://github.com/code-yeongyu/oh-my-openagent/tree/dev
1•mooreds•6m ago•0 comments

Embedded Rust RTOS vs. C RTOS

https://tweedegolf.nl/en/blog/65/async-rust-vs-rtos-showdown/
1•kooi•6m ago•0 comments

Firefox's AI Switch Is Off. Telemetry Isn't

https://marius.blog/firefox-155-ai-kill-switch-retest/
2•speckx•8m ago•0 comments

Hong Kong activist Joshua Wong pleads guilty in second national security case

https://www.nbcnews.com/world/asia/hong-kong-activist-joshua-wong-pleads-guilty-second-national-s...
2•mikhael•9m ago•0 comments

I Am not Going To Buy A Computer (2000) [pdf]

https://classes.matthewjbrown.net/teaching-files/philtech/berry-computer.pdf
1•Tomte•9m ago•0 comments

Shein's Unhappy IPO

https://www.ft.com/content/66df7f0e-ce6a-4619-8044-fa23423db3e7
2•JumpCrisscross•10m ago•0 comments

CFTC moots rules to stop prediction markets from giving affiliates advantages [pdf]

https://www.govinfo.gov/content/pkg/FR-2026-08-06/pdf/2026-15948.pdf
2•JumpCrisscross•10m ago•0 comments

Camerabuds

https://www.sandbar.com/learning-by-doing
2•minafahmi•10m ago•0 comments

Foreign business owners leave Japan in droves under tighter visa rules

https://asia.nikkei.com/spotlight/japan-immigration/foreign-business-owners-leave-japan-in-droves...
3•mikhael•11m ago•0 comments

Slope over Y Intercept

https://mattrickard.com/hire-slope-not-intercept
2•iacguy•12m ago•0 comments

Claude config-drift-checker: CI for your Claude.md, skills and hooks

https://github.com/jameskomo/config-drift-checker.
2•smartwordworld•13m ago•0 comments

Why do so many tools have JSON config files?

https://textlog.cc/post/895
4•stagas•16m ago•2 comments

Show HN: Codeknow – Architecture health scores for any codebase, no LLM needed

https://github.com/asalsali/codeknow
2•alexjsalsali•17m ago•0 comments

A Million Falcons Went Missing. Here’s How They Were Found

https://www.nationalgeographic.com/animals/article/falcons-migration-angola-falcopolis
4•bryanrasmussen•19m ago•0 comments

What Makes LLM Tokenization Slow?

https://healeycodes.com/what-makes-llm-tokenization-slow
2•ibobev•20m ago•0 comments

Google Donates Longfellow ZKP Library to Linux Foundation Europe

https://blog.google/products-and-platforms/platforms/google-pay/zero-knowledge-proof-library-linu...
3•pentagrama•21m ago•0 comments

Detecting LLMs

https://www.usebox.net/jjm/blog/detecting-llms/
2•speckx•22m ago•0 comments

The companies powering AI are outperforming those building it

https://www.home.saxo/content/articles/commodities/the-companies-powering-ai-are-outperforming-th...
2•toomuchtodo•24m ago•0 comments

Afterword (game): for each adjective, type the noun most likely to follow it

https://afterword.exe.xyz/
2•sea-gold•24m ago•0 comments

No AI until high school:NYC schools announce major classroom technology overhaul

https://abc7ny.com/post/new-york-city-public-schools-banning-ai-use-middle-school-year/19778716/
7•thunderbong•25m ago•0 comments

OWASP Top for Agentic Applications – The Benchmark for Agentic Security

https://genai.owasp.org/2025/12/09/owasp-top-10-for-agentic-applications-the-benchmark-for-agenti...
1•Bluestein•25m ago•0 comments

Meta bricked the cameras on its AI glasses

https://www.businessinsider.com/meta-glasses-camera-disabled-tampering-recording-light-update-2026-9
3•simpleintheory•25m ago•0 comments

Strands Agents SDK

https://strandsagents.com/
1•taylorbuley•26m ago•0 comments

This Fence Has No Farmer (Chesterton's Fence and AI-Generated Code)

https://adamgreenough.net/blog/this-fence-has-no-farmer/
2•xadz•27m ago•0 comments

The Overton Window of Food

https://think-twice.me/?p=116
1•zug_zug•27m ago•0 comments

I Don't Think I Can Stay in Tech

https://coyotetracks.org/blog/stay-in-tech/
4•speckx•27m ago•0 comments