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

Advancing BDD Software Testing: Dynamic Scenario Re-Usability and Step Auto-Comp

https://arxiv.org/abs/2402.15928
2•alihassaanmug•5m ago•0 comments

Show HN: A fake small claims court for petty complaints

https://benlirio.com/petty-small-claims/
1•blirio•5m ago•0 comments

Spotting Specification Gaps with Small Proof-Oriented Tests

https://risemsr.github.io/blog/2026-04-16-spotting-specs/
1•matt_d•6m ago•0 comments

Ancient Mughal tradition of pigeon-rearing thrives in India's capital

https://www.reuters.com/world/india/ancient-mughal-tradition-pigeon-rearing-thrives-indias-capita...
1•petethomas•7m ago•0 comments

"Capital Punishment" Trivia Game

https://games-by-will.com/capital-punishment/
1•wjuseck•8m ago•0 comments

Is AI a Bubble

1•Robelkidin•9m ago•0 comments

Sonnet 4.6 model could mistakenly use wrong model for OpenAI

https://github.com/anthropics/claude-code/issues/51417
1•keytalker•10m ago•0 comments

What Is Multi-Cloud Security? Challenges and Best Practices

https://spacelift.io/blog/multi-cloud-security
1•kat-w•10m ago•0 comments

Mac OS X 10.6 Snow Leopard – Now Available (2009)

https://news.ycombinator.com/item?id=781964
1•thomassmith65•12m ago•0 comments

RLMs are the new reasoning models

https://raw.works/rlms-are-the-new-reasoning-models/
1•dnw•22m ago•0 comments

Gell-Mann AImnesia

https://huonw.github.io/blog/2026/04/gell-mann-aimnesia/
1•dbaupp•23m ago•1 comments

Mall Code

https://mall.merkoba.com
1•madprops•24m ago•0 comments

Anthropic says OpenClaw-style Claude CLI usage is allowed again

https://docs.openclaw.ai/providers/anthropic
2•jmsflknr•27m ago•0 comments

No Naked Singularity, Whatever the Physical Collapse

https://zenodo.org/records/16181570
2•jruohonen•27m ago•0 comments

Svelte-check-native: Blazing fast svelte-check built with Rust

https://github.com/harshmandan/svelte-check-native
1•thunderbong•29m ago•0 comments

US Utilities Plan $1.4T for AI Data Centers

https://tech-insider.org/us-utility-1-4-trillion-ai-data-center-energy-2026/
2•jackyli02•29m ago•0 comments

Theseus, a Static Windows Emulator

https://neugierig.org/software/blog/2026/04/theseus.html
1•matt_d•30m ago•0 comments

PageGuard – scan a URL, get compliance docs from the actual tech detected

https://www.getpageguard.com
1•Dhicks_builds•30m ago•0 comments

Smart Home for Beginners: Where to Start

https://aigadgetexpert.com/best-smart-home-beginners-2026
1•amghal•31m ago•0 comments

Jersey Mike's confidentially files for IPO

https://www.cnbc.com/2026/04/20/jersey-mikes-ipo.html
1•lxm•32m ago•0 comments

Pica: Better Font Management for macOS

https://pica.joshpuckett.me/
2•jbegley•36m ago•0 comments

Stb_AVIF: A pure C89, Libc-only AVIF decoder in stb-style single-header form

https://github.com/lenchan139/stb_avif
1•roytam87•37m ago•1 comments

Can you make a picture of a dog wearing a hat

https://dispatchesfromthefuture.substack.com/p/can-you-make-a-picture-of-a-dog-wearing
1•JoiDegn•38m ago•0 comments

Show HN: Local, agent-friendly double-entry bookkeeping and tax prep

https://github.com/andrewchilds/moneypit
1•andrewchilds•39m ago•0 comments

Substack added a scheduler. Here's why I kept building PubQ anyway

https://www.indiehackers.com/post/substack-added-a-scheduler-heres-why-i-kept-building-pubq-anywa...
1•rkapdi•40m ago•0 comments

Trump's Landman Iran Strategy [video]

https://www.youtube.com/watch?v=VZsm3Z2njAQ
1•keepamovin•41m ago•0 comments

They Built the 'Cursor for Hardware.' Now, Anthropic Wants In

https://www.wired.com/story/schematik-is-cursor-for-hardware-anthropic-wants-in-on-it/
1•CharlesW•41m ago•0 comments

My Linux Setup for Work and Life – NixOS, Niri, Helix [video]

https://www.youtube.com/watch?v=CeUOz_xtO-o
1•AnthOlei•41m ago•0 comments

Show HN: Kern – Agents that do the work and show it

https://github.com/oguzbilgic/kern-ai
1•obilgic•45m ago•0 comments

Sony implementing age verification for PlayStation users

https://twitter.com/CR1337/status/2046427329866694676
3•CR1337•48m ago•1 comments