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

Staged Publishing for NPM Packages

https://docs.npmjs.com/staged-publishing/
1•mooreds•27s ago•0 comments

Professional Dual-Sided Monitors

https://www.philips.co.uk/c-m-so/monitors/dual-sided
1•speckx•1m ago•0 comments

What is a harmonic? An interactive comic about additive synthesis

https://melatonin.dev/additive-synth-comic/what-is-a-harmonic/
2•birdculture•2m ago•0 comments

What if you dropped a bowling ball in the Mariana Trench? [video]

https://www.youtube.com/watch?v=FYoHYq8VRt0
2•skibz•8m ago•0 comments

Poison Your Data

https://skuka.online/poison-your-data/
2•speckx•8m ago•0 comments

Driving Porsche's most powerful car–and no, it's not a 911

https://arstechnica.com/cars/2026/05/porsches-cayenne-coupe-electric-brings-formula-e-tech-to-the...
1•canucker2016•8m ago•0 comments

How to Think About Longevity Interventions

https://olafurpall.substack.com/p/how-to-think-about-longevity-interventions
1•kkoncevicius•9m ago•0 comments

1-Bit and Ternary Bonsai Image 4B: Image Generation for Local Devices

https://prismml.com/news/bonsai-image-4b
2•xenova•9m ago•0 comments

Why Scientists Retired the Dire Climate Scenario Used for over a Decade

https://www.nytimes.com/2026/05/26/climate/emissions-worst-case-scenario-rcp.html
2•zzzeek•9m ago•0 comments

Vtermux

https://www.mcpantz.org/blog/2026/05/24/introducing-vtermux/
1•angelixd•9m ago•0 comments

Is It Impossible to Cool a Datacenter in Space? (Scott Manley) [video]

https://www.youtube.com/watch?v=FlQYU3m1e80
1•fooker•9m ago•1 comments

AskMingLi: AI-assisted BaZi chart readings

https://askmingli.com
1•corleylun•10m ago•0 comments

SafeDeps – a local dependency safety gate for Python/NPM/NuGet

https://github.com/jaydemks/SafeDeps
1•jaydemks•12m ago•0 comments

Coworkers Producing Shit Code

2•GamingAtWork•12m ago•1 comments

Talking Heads from the Year 2053 – Episode Zero [video]

https://www.youtube.com/watch?v=wokyfBA7lbY
1•deadprogram•16m ago•0 comments

LightScribe

https://en.wikipedia.org/wiki/LightScribe
1•skibz•16m ago•0 comments

Show HN: Flow Simulator – GitHub Flow vs. trunk-based development side by side

https://mainline.dev/flow-simulator
1•natyoung•17m ago•0 comments

A New Consciousness of Mathematics

https://apoorvapanidapu.substack.com/p/a-new-consciousness-of-mathematics
1•digital55•18m ago•0 comments

Musk's Grandiose Media Ambitions Are Now a Real Threat to Some Major Players

https://www.hollywoodreporter.com/business/business-news/elon-musk-spacex-media-ambitions-x-adver...
4•thm•19m ago•0 comments

AI Isn't Management. Try Explaining That to Matthew Prince

https://www.programmablemutter.com/p/ai-isnt-management-try-explaining
3•cratermoon•20m ago•0 comments

The Cost of Correctness

https://velocitycurve.substack.com/p/the-cost-of-correctness
1•mooreds•20m ago•0 comments

Modern Blu-ray drives can now rip GameCube, Wii, and Xbox 360 games to PC

https://www.tomshardware.com/video-games/console-gaming/modern-blu-ray-drives-can-now-rip-gamecub...
4•01-_-•20m ago•0 comments

Casper Serial Arsonist Who Says He Tries to 'Burn the Pain' Gets 6-12 Years

https://cowboystatedaily.com/2026/05/26/casper-serial-arsonist-who-says-he-tries-to-burn-the-pain...
2•Bender•20m ago•0 comments

Chinese GPU maker sells out over 30k GPUs within 48h

https://www.tomshardware.com/pc-components/gpus/chinese-gpu-maker-sells-out-over-30-000-gaming-gp...
3•0x1ceb00da•21m ago•1 comments

Cheers.fan #1 – Founding Infrastructure Engineers

1•Eastman_Russell•21m ago•0 comments

Moon Base

https://www.nasa.gov/moonbase/
5•big_toast•22m ago•4 comments

Disrupting Glassworm: Inside CrowdStrike's Takedown of a Dev-Targeting Botnet

https://www.crowdstrike.com/en-us/blog/inside-crowdstrike-takedown-of-a-developer-targeting-botnet/
2•chillax•22m ago•0 comments

Nvidia is finally ditching its iconic Control Panel after 20 years

https://www.tomshardware.com/pc-components/gpus/nvidia-is-finally-ditching-its-iconic-control-pan...
3•01-_-•22m ago•0 comments

Keyboard Latency Probe

https://xkqr.org/bellwether/keyboardtest.html
1•kqr•22m ago•0 comments

Show HN: Free DNS propagation checker – 40 resolvers, TTL and response times

https://dnsspy.io/dns-tools/dns-propagation-checker
2•tdondich•26m ago•2 comments