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

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•12mo ago
Agreed

Discussion on Fsnotify Maintainer Removal

https://github.com/fsnotify/fsnotify/issues/757
1•mjyut•19s ago•0 comments

3 Women Who Fundamentally Shaped Modern Software [Reddit!!!]

https://old.reddit.com/r/compsci/comments/1t6jo79/3_women_who_fundamentally_shaped_modern_software/
1•signa11•1m ago•0 comments

Eating eggs could cut Alzheimer's risk by 27%

https://www.sciencedaily.com/releases/2026/05/260506225214.htm
1•y1n0•2m ago•0 comments

Can houseplants purify the air in your home?

https://phys.org/news/2026-05-houseplants-purify-air-home-science.html
1•y1n0•3m ago•0 comments

AI giveth and AI taketh CPU

https://stackoverflow.blog/2026/05/08/ai-giveth-and-ai-taketh-cpu/
1•y1n0•3m ago•0 comments

When a Meta CTO and an AWS ProServe Principal Converge on the Same Philosophy

https://www.outcomeops.ai/blogs/the-o16g-manifesto-validates-what-weve-been-building-since-july
2•linsys•6m ago•0 comments

The layoffs will continue till we learn to use AI

https://twitter.com/championswimmer/status/2051807284691612099
3•s4i•9m ago•0 comments

Attenborough: The risk-taker who changed how we see Earth

https://www.bbc.co.uk/news/resources/idt-715ff936-f52a-429d-bb35-d1940d7f6111
2•mellosouls•10m ago•0 comments

European 8mm footage from the previous century

https://old-love.eu/
2•flixz_•14m ago•0 comments

Axavive Official Site 2026: Pricing, Bonuses, and 90-Day Guarantee

https://finance.yahoo.com/sectors/healthcare/articles/axavive-skin-exploding-2026-golden-22590060...
2•farjzaty•17m ago•0 comments

Krytonum – a bare-metal C++ OS built from scratch

https://github.com/Velo-Computing-Technologies/Krytonum
2•hs100000•17m ago•0 comments

The Nature of Programming

https://medium.com/@tautvilas/what-is-programming-22a72ef4fd02
4•brisky•18m ago•0 comments

Show HN: When the LLM Accidentally

2•lucid-dev•19m ago•0 comments

Building an In-Person System (NYC)

https://www.notion.so/Building-an-In-Person-System-NYC-354c7880b1938067843defd62925fec4?source=co...
2•field-trace•19m ago•0 comments

Show HN: SafeKibble – free email alerts when your pet's food is FDA-recalled

https://www.safekibble.app/
2•akest•20m ago•0 comments

Pasilalinic-Sympathetic Compass

https://en.wikipedia.org/wiki/Pasilalinic-sympathetic_compass
2•canjobear•22m ago•0 comments

Pay and Sit – The Coin-Operated Private Park Bench

https://www.boredpanda.com/pay-sit-the-private-bench/
3•xeonmc•26m ago•1 comments

Mojo v1.0.0b1

https://mojolang.org/releases/v1.0.0b1/
2•signa11•28m ago•0 comments

Putin's Strongman Image Is Fading as Ukraine Brings War Home to Russia

https://www.wsj.com/world/russia/putins-strongman-image-is-fading-as-ukraine-brings-war-home-to-r...
5•JumpCrisscross•31m ago•0 comments

Why Medical Records Requests Get Delayed and How to Fix It

https://boldsign.com/blogs/medical-records-requests-esignatures/
2•Rachel_Atieno•34m ago•0 comments

HantaWatch Real time hantavirus outbreak tracker

https://hantawatch.net/
3•Accher•34m ago•0 comments

Ask HN: Does Codex hits limits more easily now?

2•endorphine•38m ago•0 comments

BotScript – a TypeScript superset for code mostly written by bots

https://github.com/marcelofarias/botscript
3•mfarias•39m ago•0 comments

Positive Corner

2•Kendi_b•58m ago•2 comments

DBase: 1979-2026

https://delphinightmares.substack.com/p/dbase-1979-2026
4•deeaceofbase•58m ago•2 comments

Ask HN: How are you sandboxing AI agents and developer CLIs?

3•nikhilpareek13•1h ago•0 comments

Jon Rubinstein: Former Apple Hardware Chief on Saving Apple, iMac, iPod, iPhone [video]

https://www.youtube.com/watch?v=PvFMT58lgvk
4•anotherhue•1h ago•0 comments

Webdevbench: Evaluating AI as software development agencies

https://webdevbench-ai-benchmarks.qwikbuild.site/
2•nileshtrivedi•1h ago•0 comments

The AI Revival of the Three Mile Island Nuclear Plant

https://www.bloomberg.com/news/features/2026-05-07/three-mile-island-restart-moves-ahead-with-mic...
2•petethomas•1h ago•0 comments

Blaise – A modern self-hosting zero-legacy Object Pascal compiler targeting QBE

https://github.com/graemeg/blaise
6•peter_d_sherman•1h ago•0 comments