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

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•6mo ago
Agreed

Show HN: Radioactive Pooping Knights

https://minichessgames.com/#/play/pooping-knights
1•patrickdavey•4m ago•0 comments

Mock Roles, not Objects (2004) [pdf]

https://jmock.org/oopsla2004.pdf
1•n3t•4m ago•0 comments

I cracked a $200 software protection with xcopy

https://www.ud2.rip/blog/enigma-protector/
1•vmfunc•10m ago•1 comments

New Study Investigates How Diet May Slow Normal Brain Aging

https://www.bumc.bu.edu/camed/news-events/articles/2025/new-study-investigates-how-diet-may-slow-...
1•gslin•10m ago•0 comments

EU hits X with €120M fine for breaching the Digital Services Act

https://www.dw.com/en/eu-imposes-120-million-fine-on-elon-musks-x-for-breaking-digital-rules/a-75...
3•vincvinc•16m ago•0 comments

Windows Telemetry

https://sizeof.cat/post/windows-telemetry/
1•DustinEchoes•17m ago•0 comments

India backs off from requiring government-made security app

https://www.scworld.com/news/india-backs-off-from-requiring-government-made-security-app
1•Bender•22m ago•1 comments

Sandvik gets €500M from European Investment Bank for new, smart EVs

https://electrek.co/2025/12/05/sandvik-gets-e500m-from-european-investment-bank-for-new-smart-evs/
1•Bender•22m ago•0 comments

Ultrablack wool textiles inspired by hierarchical avian structure

https://www.nature.com/articles/s41467-025-65649-4
2•defrost•30m ago•1 comments

Five hundred reasons to not use Microsoft Azure

https://azsh.it/500
3•bsoqqb•36m ago•0 comments

State of decay in self-hosted commenting (code review)

https://bykozy.me/blog/state-of-decay-in-self-hosted-commenting/
1•byko3y•44m ago•0 comments

HTML Kong (2016)

https://www.xn--8ws00zhy3a.com/blog/2016/07/html-kong#f16.1
1•mmulet•45m ago•1 comments

DeslopifAI – Remove AI Slop

4•haeli05•53m ago•0 comments

Show HN: NanoAI – Unified AI Image Workspace (Generation, Inpainting, Upscaling)

https://nanoai.run
1•Li_Evan•53m ago•0 comments

Show HN: macOS Window Managers Directory

https://macoswm.com/
1•j0r0b0•58m ago•0 comments

Ask HN: What is the future of SaaS when things are this easy to build?

2•fbrncci•58m ago•0 comments

Making WebAssembly and Wasmtime More Portable (2024)

https://bytecodealliance.org/articles/wasmtime-portability
2•apitman•58m ago•0 comments

Data Centers Are a 'Gold Rush' for Construction Workers

https://www.wsj.com/business/data-centers-are-a-gold-rush-for-construction-workers-6e3c5ce0
1•lxm•59m ago•0 comments

A 2,500-year lineage of daemon-like naming conventions, from antiquity to AI

2•troyka•1h ago•0 comments

Mark Zuckerberg rebranded for metaverse. $70B in losses, he's moving on

https://fortune.com/2025/12/05/mark-zuckerberg-metaverse-layoffs-cuts-facebook-rebrand/
3•nsoonhui•1h ago•3 comments

Purpose from First Principles

https://planktonvalhalla.com/20251204-purpose-from-first-principles/
1•mrcgnc•1h ago•0 comments

Hitachi Cooling and Heating Innovations with Heat Pump Tech at AHR 2025 [video]

https://www.youtube.com/watch?v=tkxiW5kd7Xc
1•teleforce•1h ago•0 comments

Hitachi Heat Pumps and Domestic Hot Water (DHW)

https://www.hitachiaircon.com/ranges/heating
1•teleforce•1h ago•0 comments

Driving Xiaomi's Electric Car: Are We Cooked? [video]

https://www.youtube.com/watch?v=Mb6H7trzMfI
1•colonCapitalDee•1h ago•0 comments

Show HN: A Web UI Generator for Rust CLI Projects

https://github.com/wb14123/clap-web-gen
1•wb14123•1h ago•0 comments

Waymo investigated for ongoing failures to stop for school busses

https://www.thestreet.com/technology/waymo-investigation-could-stop-autonomous-driving-in-its-tracks
8•toss1•1h ago•0 comments

Show HN: Day 0 of Walkable Infrastructure

1•duane_powers•1h ago•0 comments

Linux Founder Linus Torvalds Defends Windows' Blue Screens of Death

https://www.pcworld.com/article/3002074/linux-founder-linus-torvalds-defends-windows-blue-screens...
1•teleforce•1h ago•0 comments

Drosophila Brain Model

https://github.com/philshiu/Drosophila_brain_model
1•throwaway2027•1h ago•0 comments

Linux is the future of gaming – Gabe Newell, 2013 at LinuxCon [video]

https://www.youtube.com/watch?v=yeCuasjxsWk
4•embedding-shape•1h ago•0 comments