frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Robot dogs with Elon Musk heads roam Berlin museum in Beeple's new exhibit

https://apnews.com/article/germany-berlin-robot-dogs-beeple-bezos-digital-art-4a2be2a4a4490553ad6...
2•rbanffy•6m ago•0 comments

Show HN: Fast xlsx writer in Rust with Python bindings

https://github.com/omarirfa/Jetxl
1•fl4res•8m ago•0 comments

Suno and the Myth-Making of Making Music

https://illegal.solutions/posts/suno_interview
2•totallygeeky•9m ago•1 comments

Pebble Index 01 production update

https://repebble.com/blog/how-i-use-my-index-01-production-update
1•stavros•9m ago•0 comments

Static web hosting on Kubernetes with OCI images as volumes

https://kowalski7cc.xyz/blog/kubernetes-web-hosting/
1•kowalski7cc•9m ago•1 comments

Musk's xAI Fails to Pay Staff $420 for Giving Their Tax Returns to Grok

https://www.bloomberg.com/news/articles/2026-05-18/musk-s-xai-promised-staff-420-for-their-tax-re...
3•petethomas•9m ago•0 comments

Needle-rs – AI Function calling in the browser, 258 KB WASM

https://needle-rs.pages.dev
1•geekgineer•10m ago•0 comments

'It's felt like homework': Why Star Wars went so wrong

https://www.bbc.com/culture/article/20260515-why-star-wars-went-so-wrong
1•xg15•12m ago•0 comments

Academicus Otiosus: The Lazy Academic

https://thescholarlyletter.scholar-square.com/p/academicus-otiosus-the-lazy-academic
1•luispa•12m ago•0 comments

A Builder's Letter to Anthropic

https://unforced.substack.com/p/a-builders-letter-to-anthropic
1•Aaronneyer•14m ago•0 comments

No More JetBrains Products for Me

https://matthewkosarek.xyz/posts/jetbrains/
2•matthewkosarek•14m ago•0 comments

The Enshittification of History

https://www.antipope.org/charlie/blog-static/2026/05/the-enshittification-of-histor.html
2•rbanffy•15m ago•0 comments

UBS: The bank that outgrew a country

https://www.ft.com/content/19e68223-1b35-41e7-b1f2-2633f9d618db
1•theanonymousone•16m ago•0 comments

Discogo – Turn any logo or image into a 3D disco ball

https://discogo.vercel.app
1•nanxiaobei•17m ago•1 comments

'Pro Law Enforcement Bill' Clarity Passed Out of Committee

https://www.therage.co/clarity-act-senate-banking/
1•Cider9986•18m ago•0 comments

The Tech Bros Are Going to Etiquette School

https://www.wsj.com/lifestyle/careers/slow-ventures-tech-etiquette-class-20feced9
1•Cider9986•18m ago•0 comments

Trump drops IRS lawsuit in exchange for DOJ $1.8B 'weaponization' fund

https://www.reuters.com/world/trump-dismisses-lawsuit-against-irs-court-filing-shows-2026-05-18/
4•TechTechTech•19m ago•0 comments

The Chinese EV standard winning globally is banned in the U.S.

https://restofworld.org/2026/us-china-ev-tech-ban-isolation/
6•speckx•20m ago•0 comments

Actively Hiring at OpenAI

https://openai.com/careers/search/
1•lizzeai•20m ago•0 comments

How Trump's crypto venture and Iran's top exchange use the same crypto networks

https://www.reuters.com/investigations/how-trumps-crypto-venture-irans-top-exchange-tapped-into-s...
3•thisisit•21m ago•0 comments

Nuclear Reactor Simulator

https://dalton-nrs.manchester.ac.uk/
1•debesyla•22m ago•0 comments

X accounts are limited to 50 posts and 200 replies a day unless they pay

https://www.engadget.com/2175771/x-free-accounts-limited-to-50-posts-and-200-replies-a-day/
1•cdrnsf•23m ago•0 comments

Python implementation for text generation using EEG signals from the brain

https://github.com/VanshShah1/Thought2Text
2•jsdjzvdns•23m ago•0 comments

Conditional Rendering over Nil Coalescing

https://blog.eliperkins.com/conditional-rendering-over-nil-coalescing/
1•ingve•24m ago•0 comments

Brilliant Polymaths, and the Advice They Left Behind(2017)

https://bigthink.com/smart-skills/historys-greatest-polymaths-and-the-advice-they-left-behind/
2•rolph•24m ago•0 comments

RWX now supports Codeberg and Forgejo

https://www.rwx.com/blog/codeberg-forgejo-support
1•tagraves•26m ago•0 comments

SIMD-accelerated integer-to-string conversion

https://lemire.me/blog/2026/05/18/simd-accelerated-integer-to-string-conversion/
1•ingve•28m ago•0 comments

PCs That Never Made It, Chapter 20 – Dec Rainbow, TI Professional, Victor 9000 [video]

https://www.youtube.com/watch?v=tkQQ2eYXMhE
2•rbanffy•28m ago•1 comments

The tyranny of single page apps

https://blog.bidisaster.party/spas/
3•speckx•29m ago•0 comments

Skills in Web, iOS, and Android

https://x.ai/news/grok-skills
1•surprisetalk•30m ago•0 comments