frontpage.
newsnewestaskshowjobs

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

IBM Has a $10B Plan to Build the Ultimate Quantum Computer

https://www.barrons.com/articles/ibm-stock-quantum-computing-aafbb1eb?st=vEn99N&mod=1440&user_id=...
1•gmays•1m ago•0 comments

Kelsey Hightower: Kubernetes and retiring at the top [video]

https://www.youtube.com/watch?v=UlXpOGIpITM
3•juanpabloaj•3m ago•0 comments

Inference: Turning Electricity into Intelligence – Stanford CS336 – Dan Fu [video]

https://www.youtube.com/watch?v=9EEm4iMAF5s
2•matt_d•5m ago•0 comments

Attackers had month-long head start on patched Check Point VPN zero-day

https://www.theregister.com/cyber-crime/2026/06/08/attackers-had-month-long-head-start-on-patched...
2•sbulaev•6m ago•0 comments

Declining Birth Rates Globally

https://flowingdata.com/2026/05/25/declining-birth-rates-globally/
2•gmays•18m ago•0 comments

Berkshirehathaway.com – The Perfect Minimalist Website

https://berkshirehathaway.com
5•SpyCoder77•34m ago•0 comments

Track Political Stories Across the Web

https://plotline.news
2•yshunnar•35m ago•0 comments

How Elon Musk Killed Hundreds of Thousands of People

https://www.currentaffairs.org/news/how-elon-musk-killed-hundreds-of-thousands-of-people
8•tastyface•35m ago•2 comments

WWDC 2026 Platforms State of the Union [video]

https://developer.apple.com/videos/play/wwdc2026/102/
2•ksec•35m ago•0 comments

Show HN: DaysLeft – a bio-age clock that shows a range, not a death date

https://daysleft.io
1•neo-genesis•38m ago•0 comments

Waymo bought Apple's self-driving car proving ground for $220M

https://techcrunch.com/2026/06/08/waymo-bought-apples-self-driving-car-proving-ground-for-220m/
2•sbulaev•41m ago•0 comments

Deciding on secession: how familiar and unknown futures shape loss aversion

https://www.frontiersin.org/journals/political-science/articles/10.3389/fpos.2026.1805138/full
1•PaulHoule•41m ago•0 comments

Screenlet lets you record and export product demo videos from the browser

https://chromewebstore.google.com/detail/screenlet/cdefecgpidbfmcifjecnbhldndpflhod
2•sakhtar0092•42m ago•0 comments

Build a ZeroCost Web Automation Pipeline with OpenRouter, OpenClaw, and MediaUse

https://pub.towardsai.net/build-a-zero-cost-web-automation-pipeline-with-openrouter-openclaw-and-...
1•yooibox•48m ago•0 comments

I Analyzed 163K Lines of Kuzu's Codebase. Here's Why Apple Wanted It

https://medium.com/data-science-collective/i-analyzed-163k-lines-of-kuzus-codebase-here-s-why-app...
2•ksec•49m ago•0 comments

Lscpu for Mac / Apple Silicon

https://github.com/hcarvalhoalves/lscpumac
1•manoDev•49m ago•1 comments

My URL/NSURL bug in the OS 27

https://lapcatsoftware.com/articles/2026/6/1.html
1•ilreb•52m ago•0 comments

Hot path optimization. When float division beats integer division

https://blog.andr2i.com/posts/2026-06-08-optimization-catalog-when-float-division-beats-integer-d...
1•birdculture•53m ago•0 comments

Show HN: Durable, asynchronous LLM workflow engine in Rust

https://crates.io/crates/langcontinuation
1•rescrv•54m ago•0 comments

Ask HN: Do you also feel like KYC is turning you off to the concept of money

2•JumpinJack_Cash•55m ago•0 comments

Faith, Dignity, and Human Flourishing: Hearing God's Voice in an Age of AI [video]

https://www.youtube.com/watch?v=Ts5Z64A0Vv4
2•ldayley•58m ago•1 comments

Show HN: SnakeBaby – Cute symbols, bios, kaomoji, and username ideas

https://snakebaby.com/
1•zylics•59m ago•0 comments

Show HN: Web tools an AI agent pays for per call in USDC, no API key (x402+MCP)

https://superhighway.walls.sh
2•patwalls•1h ago•0 comments

AI, Argentina and the Antichrist: Thiel's Vision Blooms

https://www.thenerdreich.com/ai-argentina-and-the-antichrist-thiels-vision-blooms/
1•prawn•1h ago•0 comments

New command-line in macOS 27 for interacting with Foundation Models

https://bsky.app/profile/alex.zenla.io/post/3mnswr2qxb22i
2•alexzenla•1h ago•0 comments

Reading Buffett and Munger, the stuff that stuck had nothing to do with stocks

https://old.reddit.com/r/ValueInvesting/comments/1u0hbzt/spent_my_first_year_actually_reading_buf...
1•dkga•1h ago•0 comments

Our Stock Market Is Broken

https://www.nytimes.com/2026/06/08/opinion/spacex-ipo-stock-market.html
4•2OEH8eoCRo0•1h ago•0 comments

Autonomy Is Not a Switch

https://autonomousagents19.com/blog/governed-autonomy/approval-hybrid-autonomous-three-modes-of-t...
1•KissMySaas•1h ago•0 comments

macOS 27 requires Apple Silicon, as Apple draws down the Intel Mac era

https://arstechnica.com/gadgets/2026/06/macos-27-requires-apple-silicon-as-apple-draws-down-the-i...
5•gk1•1h ago•0 comments

How to Find Consulting Clients (2015)

https://www.gkogan.co/how-to-find-consulting-clients/
1•gk1•1h ago•0 comments