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

OpenAI's new Agent Sandbox Cloud [video]

https://www.youtube.com/watch?v=OqM67QG_Ikk
1•iacguy•27s ago•0 comments

Noisia: Harmful Workload Generator for PostgreSQL

https://github.com/lesovsky/noisia/
1•handfuloflight•54s ago•0 comments

Starship – Critical Path [video]

https://www.youtube.com/watch?v=-a0ecQMq-rM
1•throwitaway222•2m ago•0 comments

AI use case library – Who is deploying AI, and what happened (150+ cases)

https://aiweekly.co/ai-use-cases
1•adu_onemore•4m ago•0 comments

Human Emacs

https://human-emacs.org/
1•birdculture•4m ago•0 comments

France powers down several nuclear reactors due to extreme heat

https://www.lemonde.fr/en/france/article/2026/07/12/france-powers-down-several-nuclear-reactors-d...
3•_Microft•6m ago•1 comments

Grok Build uploading full repos and .envs to GCP

https://twitter.com/xbtoshi/status/2076338252051841512
2•ashleypeacock•6m ago•0 comments

Trump notifies Congress of new war against Iran

https://www.politico.com/news/2026/07/13/trump-notifies-congress-of-new-war-against-iran-00995170
7•bushwart•7m ago•1 comments

AI Agents for Increasing Revenue

https://alum.so/
2•Sumiran7•7m ago•0 comments

The Tick That Hunts Down Its Hosts–Including Us

https://www.newyorker.com/magazine/2026/07/06/the-tick-that-hunts-down-its-hosts-including-us
1•randycupertino•9m ago•0 comments

Venice's access fee doesn't reduce tourism: it selects who can afford it

https://andreafontana.it/en/venice-entry-ticket-overtourism.html
1•trikko•10m ago•0 comments

Microsoft commits $2.5B, 6k employees AI implementation unit

https://www.cnbc.com/2026/07/02/microsoft-commits-2point5-billion-6000-employees-ai-implementatio...
1•rbanffy•10m ago•0 comments

Quantum-Augmented Databases Study Aims to Break Bottlenecks Slowing Data Systems

https://viterbischool.usc.edu/news/2026/07/toward-quantum-augmented-databases-new-usc-study-could...
1•rbanffy•10m ago•0 comments

Brazilian woman held as a slave for 38 years (2021)

https://www.dw.com/en/brazilian-woman-held-as-a-slave-for-38-years/a-56177797
1•toilet•10m ago•0 comments

Human settlement of East Polynesia coincident with prolonged S. Pacific drought

https://www.pnas.org/doi/10.1073/pnas.1920975117
1•janalsncm•13m ago•0 comments

Welcome to the Modern World. Is The Most Unhelpful Thing You Can Say to a Dev

https://codemonkey.studio/welcome-to-the-modern-world-why-that-might-be-the-most-unhelpful-thing-...
1•rmason•13m ago•1 comments

Brain-inspired hardware brings faster, low-power anomaly detection to AI systems

https://techxplore.com/news/2026-07-brain-hardware-faster-power-anomaly.html
1•rbanffy•14m ago•0 comments

I built a domain name discovery tool I don't hate

https://domaame.com
1•cybrjoe•14m ago•1 comments

Meta's AI Glasses Will Activate the Camera Without the Camera Indicator Light

https://www.privacyguides.org/news/2026/07/13/the-next-version-of-metas-ai-glasses-will-activate-...
1•Cider9986•14m ago•0 comments

Evelyn Berezin: instamatic for UAL, then first word processor

https://www.invent.org/inductees/evelyn-berezin
1•stmw•16m ago•0 comments

Apple sues OpenAI after ex-engineer allegedly used bug to steal trade secrets

https://arstechnica.com/tech-policy/2026/07/apple-sues-openai-after-ex-engineer-allegedly-used-bu...
2•bookmtn•16m ago•0 comments

New York City's chief technologist launches team to transform city's technology

https://www.fastcompany.com/91571965/new-york-citys-chief-technologist-is-launching-a-new-team-to...
1•hn_acker•18m ago•1 comments

Department of War Suspends CMMC Phase II Requirements

https://www.war.gov/News/Releases/Release/Article/4542329/forging-the-arsenal-of-freedom-departme...
3•ckrailo•21m ago•0 comments

We gave open models root on broken servers and graded them on the machine

https://glassmkr.com/blog/open-model-ladder-blind-remediation
1•glassmkr•26m ago•0 comments

Making Fable Cheaper Than Opus

https://cognition.com/blog/making-fable-cheaper-than-opus
1•aarvin_roshin•28m ago•0 comments

Harness Engineering for Self-Improvement – Lil'Log

https://lilianweng.github.io/posts/2026-07-04-harness/
1•haritha1313•30m ago•0 comments

Measuring Agents in Production – ICML

https://arxiv.org/abs/2512.04123
1•haritha1313•32m ago•0 comments

Web Client SDK

1•atoapaymentsapp•33m ago•0 comments

Coluber: Language Written in Nim. Speaks Nim, C, Vlang, Python, and JavaScript

https://codeberg.org/distantfar/coluber
1•baranul•35m ago•0 comments

Consumer Resources – CFPB

https://www.consumerfinance.gov/consumer-tools/
1•enjoyyourlife•36m ago•0 comments