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

JetBrains Thinkrail

https://github.com/JetBrains/thinkrail
1•hmokiguess•28s ago•0 comments

Systemd merges support for programs written in Rust

https://github.com/systemd/systemd/pull/44324
1•acossta•56s ago•0 comments

Dreamhost: Investigating an incident affecting File Manager and Webmail

https://www.dreamhoststatus.com/pages/incident/575f0f606826303142000510/6adbcf944b61a805acedb4cd
1•8ig8•1m ago•0 comments

End of an era? How the Hermes Birkin bag is losing its scarcity appeal

https://www.reuters.com/business/retail-consumer/end-an-era-how-hermes-birkin-bag-is-losing-its-s...
1•cwwc•1m ago•0 comments

Scam Alert: Fake Captcha Prompts Users to Run Commands

https://www.umass.edu/it/news/scam-alert-fake-captcha-prompts-users-run-commands
1•thunderbong•2m ago•0 comments

Is Anybody Out There? Art in the Post-AI Era

https://programmingattack.com/articles/is-anybody-out-there-art-in-the-post-ai-era/
1•caranea•3m ago•0 comments

How I Work with Agents

https://twitter.com/thorstenball/status/2114386050638336082
1•tosh•3m ago•0 comments

Ford Patents Idea That Lets Parked Cars Autonomously Flee Danger

https://www.caranddriver.com/news/a74232385/ford-autonomous-anti-theft-patent-application/
1•RickJWagner•3m ago•0 comments

Everything you should know about certificates and PKI but are too afraid to ask

https://smallstep.com/blog/everything-pki/
1•rramadass•4m ago•0 comments

Bentley's Kyiv deadlership among the strongest, despite the war

https://www.autonext.co/news/bentley-kyiv-among-the-world-s-best-dealerships-despite-the-war
2•nephihaha•5m ago•0 comments

Low Birthrates in England Could Lead to 'Closure of 800 Primary Schools by 2029'

https://www.theguardian.com/education/2025/sep/25/low-birthrates-in-england-could-lead-to-closure...
1•karakoram•5m ago•0 comments

Anthropic Sued for Stealing Elvis Presley Music to Train AI

https://www.billboard.com/pro/elvis-presley-estate-sues-suno-anthropic/
1•01-_-•5m ago•0 comments

Bbtree: Fastest Concurrent Ordered Map

https://github.com/XiangpengHao/bbtree
1•vpj•7m ago•0 comments

Far, Far Away – Making a home on the most remote inhabited island

https://www.nytimes.com/2026/10/25/world/africa/tristan-da-cunha-island.html
2•anyonecancode•8m ago•1 comments

Product Backlog Refinement Agent – Useful or Risk?

https://age-of-product.com/product-backlog-refinement-agent/
1•swolpers•10m ago•0 comments

Vibe Coding for Free: What $0 Gets You in 2026

https://codingplans.dev/briefs/vibe-coding-for-free/
1•nedsma•12m ago•0 comments

Neuron Explorer for Qwen 4B

https://github.com/lyramakesmusic/neuron-explorer
1•vpj•14m ago•0 comments

What the Specification Did Not Say: Gaps in Test-Graded Coding-Agent Benchmarks

https://arxiv.org/abs/2610.30635
1•mehdizare•18m ago•0 comments

Show HN: QualityLayer, put the engineer back in the loop of your coding agent

https://qualitylayer.dev/
1•rittermax•19m ago•0 comments

A hacky f*d up way to portably access errno from outside of C

https://sebsite.pw/w/20260925-errno.html
1•dverlaeckt80•19m ago•0 comments

Multiplayer System in C Supports 50k Players at 60Hz on a Single Server

https://www.youtube.com/watch?v=imG2Tt_KOj4
1•birdculture•20m ago•0 comments

US Households Pay 62% More for Water Than They Did a Decade Ago, Study Finds

https://www.theguardian.com/us-news/2026/oct/06/households-drinking-water-cost-study
2•karakoram•20m ago•0 comments

Show HN: I replaced tmux with sway workspaces

https://github.com/artemave/hop
1•artemave•20m ago•1 comments

The Hibernate Origin Story (Outsider Edition)

https://fishbowl.pastiche.org/2026/10/23/hibernate-origin-story
1•dverlaeckt80•20m ago•0 comments

Rewriting Excel, PowerPoint, and Word for Agents

https://getcompound.ai/blog/rewriting-excel-powerpoint-and-word-for-agents
2•peterjliu•21m ago•0 comments

The 'else' keyword is probably a literal translation from German (2020)

https://github.com/e-n-f/if-then-else/blob/master/if-then-else.md
1•theanonymousone•21m ago•0 comments

Show HN: Music as a TypeScript program

https://twitter.com/dotproductX/status/2114386390595068154
1•mxudev•22m ago•0 comments

Flock Fever: A Review of Government Surveillance by Benn Jordan [video]

https://www.youtube.com/watch?v=OP5GDiLZ1Nw
1•input_sh•24m ago•0 comments

Generating balanced cubes for Magic: The Gathering

https://nishtahir.com/generating-balanced-cubes-for-magic-the-gathering/
1•CarefreeCrayon•27m ago•0 comments

Dolly – scroll animations in plain CSS

https://usedolly.dev/
1•eustoria•29m ago•1 comments