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•11mo 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•11mo 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•11mo 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•11mo 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•11mo ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•11mo ago
Agreed

WHO approves first Malaria drug for babies

https://www.who.int/news/item/24-04-2026-who-prequalifies-first-ever-malaria-treatment-for-newbor...
1•tchalla•5m ago•0 comments

FaceX – Face embedding in 3ms with handwritten C and AVX2,no dependencies

https://github.com/facex-engine/facex
1•bauratynov•7m ago•0 comments

HEALPix

https://en.wikipedia.org/wiki/HEALPix
1•hyperific•7m ago•0 comments

Under Blackout Threat, Wikimedia Reaches Compromise with Indonesia

https://www.barrons.com/news/under-blackout-threat-wikimedia-reaches-compromise-with-indonesia-e3...
4•exploraz•8m ago•1 comments

Scam Quantum Fud Headlines

https://decrypt.co/365444/bitcoin-q-day-draws-nearer-quantum-researcher-breaks-simplified-key
2•zeptonix•8m ago•1 comments

Show HN: A games website with a swipe feature like TikTok

https://www.brainafkgames.online/
2•sambex•11m ago•0 comments

Subvert's AI Policy

https://subvert.fm/ai-policy/
3•simonpure•11m ago•0 comments

Can Google Win the AI Hardware Race Through TPUs?

https://google-ai-race.pagey.site/
3•freakynit•13m ago•0 comments

Show HN: Limen – modern, composable auth for Go

https://limenauth.dev/blog/introducing-limen
3•brianiyoha•17m ago•0 comments

The output doesn't matter: Thoughts on Aristotle's Craftsmen in the age of LLMs

https://lambdacreate.com/posts/the-output-doesnt-matter
7•durrendal•19m ago•0 comments

Berkshire attracts interest as it slips further behind the S&P 500

https://www.cnbc.com/2026/04/25/berkshire-attracts-interest-as-it-slips-further-behind-the-sp-500...
5•episec•20m ago•0 comments

Jailbreaking a robot vacuum to run Tailscale and Valetudo

https://tailscale.com/blog/tailscale-sucks
7•theorchid•23m ago•0 comments

Polaroid's Showman (2023)

https://www.cabinetmagazine.org/kiosk/allen_jonathan_isenbart_jan_03_march_2023.php
6•XzetaU8•26m ago•0 comments

The World's Most Complex Machine

https://worksinprogress.co/issue/the-worlds-most-complex-machine/
5•mellosouls•31m ago•0 comments

Behind-the-Scenes of MacBook Neo Introduction Video

https://www.youtube.com/shorts/y4DnsCzJTRQ
60•0xbg•33m ago•2 comments

2× – nine months later: We did it

https://ideas.fin.ai/p/2x-nine-months-later
5•jamesblonde•34m ago•0 comments

The Tsundoku Trap: Why AI Makes You Start Everything and Finish Nothing

https://blog.danielvaughan.com/the-tsundoku-trap-why-ai-makes-you-start-everything-and-finish-not...
10•dvaughan•35m ago•0 comments

Building Code.overheid.nl Together

https://developer.overheid.nl/blog/2026/04/24/we-gaan-samen-code-overheid-bouwen
6•doughnutstracks•36m ago•0 comments

ALDI Eliminating an Additional 44 Ingredients – ALDI US

https://corporate.aldi.us/newsroom/news/aldi-eliminating-an-additional-44-ingredients
5•bilsbie•37m ago•0 comments

Show HN: Memweave CLI – search your AI agent's memory from the shell

https://github.com/sachinsharma9780/memweave
5•r2d2_•38m ago•0 comments

Civic-SLM is a domain-specialized fine-tune of Qwen2.5-7B for U.S. govt data

https://itsmeduncan.com/civic-slm/
6•itsmeduncan•40m ago•0 comments

Rotating Space Habitats

https://blog.engora.com/2026/04/rotating-space-habs.html
3•Vermin2000•40m ago•1 comments

Show HN: StudioLedger – Escrow-protected contracts for creators, on XRPL

https://github.com/remyyx/workledger
7•remyyx•44m ago•0 comments

Quarkdown – Markdown with Superpowers

https://quarkdown.com/
5•Tomte•45m ago•0 comments

Issue with AWS Ops Wheel

https://aws.amazon.com/security/security-bulletins/rss/2026-018-aws/
10•mooreds•47m ago•0 comments

Farting Fish Fingered (2005)

https://www.theguardian.com/education/2005/mar/11/highereducation.research
6•thunderbong•48m ago•0 comments

The Digesting Duck: a 1739 automaton that appeared to eat, digest, and defecate

https://en.wikipedia.org/wiki/Digesting_Duck
46•AgentNews•49m ago•1 comments

A Systems Glitch at Fidelity Caused One Woman's Savings to Disappear

https://www.nytimes.com/2026/04/25/your-money/fidelity-investments-fraud-alert.html
7•donohoe•50m ago•0 comments

Installing Pop!OS 24 Directly with Unsquashfs and Chroot (and No Reboot)

https://hajo.me/blog/2026/04/25/installing-popos-24-directly-with-unsquashfs-chroot-no-reboot/
3•fxtentacle•52m ago•0 comments

Electric air taxis. Vertical Aerospace's VX4 just cleared a key test

https://www.scientificamerican.com/article/can-electric-air-taxis-carry-passengers-vertical-aeros...
7•beardyw•58m ago•0 comments