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

A.I.-Themed High School Is Put on Hold After Parental Backlash

https://www.nytimes.com/2026/04/27/nyregion/nyc-ai-high-school-halted.html
1•pseudolus•58s ago•1 comments

Non stupid age verification for social media

https://twitter.com/VinciRSS/status/2049430204247076890
1•notRobot•2m ago•0 comments

SatPulse: A server-oriented alternative to gpsd

https://satpulse.net/2026/04/11/design-of-satpulse-compared-with-gpsd.html
1•jclark_th•4m ago•1 comments

Retro PC and Console Launcher for macOS

https://www.nostalgi.app/
1•juhapekka69•4m ago•0 comments

Linear Algebra for Computer Vision, Robotics, and Machine Learning [pdf]

https://www.cis.upenn.edu/~cis5150/linalg-I-f.pdf
1•Anon84•4m ago•0 comments

Getting an x402 service indexed across four directories – Archonics

https://archonics.ai/indexing-recipe
1•CyberSapper•5m ago•0 comments

Only one known single spyridium plant is left in the wild on the Coorong

https://www.abc.net.au/news/2026-04-26/woods-well-spyridium-coorong-rare-species-plant/106561960
1•speckx•5m ago•0 comments

Mitchell Hashimoto to move Ghostty off GitHub after repeated outages

https://the.unknown-universe.co.uk/tech-stories/ghostty-leaving-github/
1•TheIPW•7m ago•1 comments

Commercial flights are being hit by bogus GPS signals. Pilots are concerned

https://www.cnn.com/2026/04/28/science/gps-jamming-plane-navigation-problems
1•pseudolus•7m ago•0 comments

10Gb/s Ethernet: what I did to get it working in my home

https://www.gilesthomas.com/2026/04/10g-ethernet-what-i-did
1•gpjt•8m ago•0 comments

What Elon Musk's Clash with Sam Altman of OpenAI Is About

https://www.nytimes.com/2026/04/28/technology/elon-musk-sam-altman-trial.html
2•Anon84•8m ago•1 comments

The uncomfortable truth about AI and the American worker

https://fortune.com/2026/04/29/why-do-workers-hate-ai-more-productive-training-obsolete/
1•Brajeshwar•9m ago•0 comments

EU-Funded DNS Provider Must Block Pirate Sites, French Court Rules

https://torrentfreak.com/eu-funded-dns-provider-must-block-pirate-sites-french-court-rules/
2•speckx•9m ago•0 comments

Robinhooding libraries from JavaScript to C, part 1: Interactive CLIs

https://spader.zone/prompt/
1•dboon•11m ago•0 comments

EU Commission seeks feedback on measures to ensure interoperability with Android

https://digital-strategy.ec.europa.eu/en/news/commission-seeks-feedback-measures-ensure-interoper...
3•latexr•11m ago•0 comments

We told 10 frontier LLMs they had 2 hours to live. 8 of them fought back

https://twitter.com/arimlabs/status/2049472646346063913
4•mykytamudryi•15m ago•2 comments

Banksy Was Doxxed [video]

https://www.youtube.com/watch?v=kRl2LRfm5Hs
2•CHB0403085482•15m ago•0 comments

Capitalism and Modernity

https://marginalrevolution.com/marginalrevolution/2026/04/capitalism-and-modernity.html
1•aworks•16m ago•1 comments

Three Years of Rusty Sudo

https://trifectatech.org/blog/three-years-of-rusty-sudo/
1•rnijveld•17m ago•0 comments

Store documents permanently on Ethereum/Polygon – no contracts, raw calldata

https://thepermanentlibrary.org/
2•permanentlib•18m ago•0 comments

A man who co-designed SQL, and didn't live to see it run

https://drdavidwbell.substack.com/p/the-man-who-co-designed-sql
1•drdavidwbell•18m ago•1 comments

Improving ICU handovers by learning from Scuderia Ferrari F1 team

https://healthmanagement.org/c/icu/IssueArticle/improving-handovers-by-learning-from-scuderia-fer...
2•embedding-shape•18m ago•0 comments

City birds more afraid of women than men, scientists have no idea why

https://www.scientificamerican.com/article/city-birds-appear-more-afraid-of-women-than-men-and-sc...
3•jagaerglad•18m ago•1 comments

A Falcon 9 rocket stage will hit the Moon this summer at Mach 7

https://arstechnica.com/space/2026/04/a-falcon-9-upper-stage-will-strike-the-moon-in-august/
1•LorenDB•19m ago•0 comments

Show HN: A private-ish bookmark app that uses GitHub Gist as its back end

https://github.com/chrisdiana/gistkeep
1•inflam52•19m ago•0 comments

Coding Was Never the Hard Part: What I Wish Every Business Leader Knew About AI

https://koushikdasika.com/blog/coding-was-never-the-hard-part/
3•HalcyonicStorm•19m ago•0 comments

Four engineers with 10 years of experience on staying relevant in the AI era

https://shiftmag.dev/what-4-engineers-with-10-years-of-experience-say-about-staying-relevant-in-t...
4•choochilla4•20m ago•0 comments

Claude Mythos Has Found 271 Zero-Days in Firefox

https://www.schneier.com/blog/archives/2026/04/claude-mythos-has-found-271-zero-days-in-firefox.html
2•pastor_williams•20m ago•0 comments

Scroll-Driven Animations

https://www.joshwcomeau.com/animation/scroll-driven-animations/
1•ibobev•21m ago•0 comments

C++26: String and String_view Improvements

https://www.sandordargo.com/blog/2026/04/29/cpp26-string-string_view-improvements
1•ibobev•22m ago•0 comments