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

Cancer rates rising more quickly among younger people, international research

https://www.theguardian.com/society/2026/oct/06/cancer-rates-rising-more-quickly-among-younger-pe...
1•donsupreme•1m ago•0 comments

Linux 7.4 Introduces DMA-BUF Support to I/O Path with IO_uring

https://www.phoronix.com/news/DMA-BUF-IO-uring-Linux-7.4
1•dabinat•2m ago•0 comments

Anthropic's 'Adjusted' Profit Exposes Wall Street's Earnings Game

https://www.wsj.com/finance/investing/anthropics-adjusted-profit-exposes-wall-streets-earnings-ga...
1•JumpCrisscross•4m ago•0 comments

BYD’s $10,000 EV blows a tire at nearly 90 mph — Watch what happens

https://electrek.co/2026/10/27/byds-10k-ev-blows-tire-nearly-90-mph-watch-what-happens/
2•cisc•5m ago•0 comments

Build IKEA Step by Step

https://www.usebygga.com
1•plurby•5m ago•0 comments

Apple Studio Display XDR Scrolling Stutter on the M5 Pro

https://macanorak.com/studio-display-xdr-scrolling-stutter-on-the-m5-pro-macbook-pro-whats-going-...
2•bhj•6m ago•0 comments

Microsoft Is Trying to Shed a Lot of Workers. Just Don't Call It a Layoff

https://www.wsj.com/business/microsoft-job-cuts-buyout-offers-ff3c5dde
4•JumpCrisscross•9m ago•0 comments

No One Needs Us Anymore [video]

https://www.youtube.com/watch?v=zONGVaONKe8
2•duck•12m ago•0 comments

China Claims Strong Economic Growth, but Skeptics Question Official Figures

https://www.wsj.com/economy/china-claims-strong-economic-growth-but-skeptics-question-official-fi...
1•JumpCrisscross•13m ago•0 comments

Show HN: Spend Extra AI Usage Transcribing Murray's New English Dictionary

https://github.com/timjonez/new-english-dictionary
1•dvorak007•14m ago•0 comments

Ask HN: When did HN become inconsistent algorithmic feed?

1•bosshawg•15m ago•0 comments

iPhone Duo Complete Teardown [video]

https://www.youtube.com/watch?v=_Xe2JAoMwIA
1•chirau•19m ago•1 comments

Clean room, no decomp/recomp, all original Mac OS System 1

https://classick.net/about/
1•segaboy81•22m ago•0 comments

A Mathematical Theory of the Jacobian Lens

https://arxiv.org/abs/2610.31955
1•krackers•22m ago•1 comments

Breaking Ludwig's Unbreakable Code

https://medium.com/@mikehall314/breaking-ludwigs-unbreakable-code-2fd3e5925a48
1•mikehall314•23m ago•0 comments

The doorman fallacy in the age of AI

https://www.adriankrebs.ch/blog/ai-and-the-doorman-fallacy/
2•hubraumhugo•26m ago•0 comments

Cycle or Train: An Xteink Dashboard

https://whitebeard.blog/posts/cycle-or-train/
1•techbelly•28m ago•0 comments

Finding Panics with Call Graph Analyzer

https://tweedegolf.nl/en/blog/242/finding-panics-with-call-graph-analyzer/
2•ibobev•28m ago•0 comments

The Shift of Theseus – Toy Bit Provenance Abstract Domain

https://pypy.org/posts/2026/10/toy-bit-provenance.html
1•ibobev•29m ago•0 comments

iPhone Users Are Getting an Upgrade to Their Cape Service

https://www.cape.co/blog/iphone-users-are-getting-an-upgrade-to-their-cape-service
1•tony101•29m ago•0 comments

The reclusive quant billionaire coming into the light

https://www.ft.com/content/bc6bba42-0b33-4825-a2c5-cff9b8f5c591
2•bookofjoe•29m ago•1 comments

Sharing a boulder without a back end: files and previews on iOS

https://freshteapot.net/writing/sharing-boulders-without-a-backend/
1•freshteapot•29m ago•0 comments

An Evening with Berferd in Which a Cracker Is Lured, Endured, and Studied [pdf]

https://www.cheswick.com/ches/papers/berferd.pdf
1•ibobev•29m ago•0 comments

Head of ADL claims they are "cleaning up" AI and Wikipedia

https://twitter.com/infolibnews/status/2115106467460108731
2•newspaper1•30m ago•0 comments

Ask HN: Do u think there should be a auto recovery tool for agents?

1•willlzl•30m ago•0 comments

Finding Frequencies Without an FFT: Sinusoids as Autoregressive Models

https://www.sithankanna.com/posts/prony-method.html
3•hdit•32m ago•0 comments

Acoustic-piezoelectric energy model of the Great Pyramid (Zenodo preprint)

https://zenodo.org/records/23644594
1•psssst•33m ago•0 comments

Nanotyrannus skeleton sells for $47.3M in New York auction

https://www.bbc.com/news/articles/cmx28de233r2o
1•jhy•33m ago•0 comments

New Dwarf Planet Candidate in Our Solar System

https://rubinobservatory.org/news/rubin-first-dwarf-planet-candidate
3•pppone•33m ago•0 comments

Hurricane Katrina

https://en.wikipedia.org/wiki/Hurricane_Katrina
1•chistev•33m ago•0 comments