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

Light therapy app confusion: bright-light boxes vs. flicker stimulation

https://medium.com/@6thMind/light-therapy-app-confusion-bright-light-boxes-vs-flicker-stimulation...
1•smanuel•1m ago•0 comments

Show HN: PauseRead – hosted read-later with Pocket HTML import

https://pauseread.com/pocket-alternative
1•YuriiKholodkov•2m ago•0 comments

Infamous Front-Running Crypto Bot Gets Tricked and Drained for $7.5M

https://gizmodo.com/infamous-front-running-crypto-bot-jaredfromsubway-gets-tricked-and-drained-fo...
2•cainxinth•3m ago•0 comments

Accenture shares fall to lowest since 2017 as AI threat mounts

https://www.ft.com/content/9f063b07-da39-4feb-92ab-ee0f91385c62
3•JumpCrisscross•3m ago•0 comments

Information and Attention (1971)

https://www.iecodesign.com/blog/2025/8/4/information-and-attention
2•RickJWagner•4m ago•0 comments

Grid Generator

https://codequest.work/generator/grid/en/
2•ORECTIC•5m ago•0 comments

Show HN: Taqta. Made an Are.na-style visual boards for Obsidian

https://github.com/djakish/obsidian-taqta
2•wasdwasdwasd•6m ago•0 comments

Apple Internals: Swift in the Kernel – By Josh Maine

https://blog.calif.io/p/apple-internals-swift-in-the-kernel
2•rbanffy•7m ago•0 comments

Just because each item makes sense doesn't mean they make sense together

https://blog.osull.com/2026/06/22/just-because-each-item-makes-sense/
2•danosull•7m ago•0 comments

Scanned React source code: 659 security issues, one real GitHub token found

https://github.com/xiaohou2503687-design/guardrail
3•shipfastcli•7m ago•0 comments

A Bitter Lesson for Memory

https://personal-website-3bed.onrender.com/blog-viewer.html?slug=A%20Bitter%20Lesson%20for%20Memory
2•wenhan_zhou•7m ago•1 comments

Is Anyone Else Excited by Swift's Progress as a Language? – Fatbobman's Weekly

https://weekly.fatbobman.com/p/fatbobmans-swift-weekly-141
3•fatbobman•7m ago•0 comments

Stargazing

https://www.futilitycloset.com/2026/06/15/stargazing/
2•surprisetalk•8m ago•0 comments

JSON Inspector – an offline-first Chrome extension to view and query JSON

https://chromewebstore.google.com/detail/jstools-json-inspector/dkgnmlmlpipjoabeolnfnpkkfmcbcjmj
2•javatuts•8m ago•0 comments

Binance set to lose permission to operate in Europe

https://www.reuters.com/business/finance/binance-set-lose-eu-licence-bid-permission-offer-service...
4•darktoto•10m ago•0 comments

Squidbleed

https://blog.calif.io/p/squidbleed-cve-2026-47729
2•Tomte•12m ago•0 comments

SpaceX Shares Poised to Fall Again as US Market Reopens

https://www.bloomberg.com/news/articles/2026-06-22/spacex-shares-poised-to-slide-again-as-us-mark...
3•johnbarron•13m ago•0 comments

How to Fix Bay Area Transit [pdf]

https://ti.org/pdfs/BayAreaTransit.pdf
2•xnx•15m ago•1 comments

Show HN: Lockin – system-level distraction blocker controlled via text

https://www.lockinmcp.com
2•Kiog-Aser•15m ago•0 comments

I Shot Films for 30 Years. Now I'm Building Safety Systems for AI Agents

https://maref.org/blog/from-steadicam-to-agent-governance
2•Athena-maref•16m ago•0 comments

Resolving Uncertainty: A Unified Overview of Rabbinic Methods [pdf]

https://u.cs.biu.ac.il/~koppel/rov-25.5.pdf
3•FergusArgyll•18m ago•0 comments

When Diets Don't Work: Parents Turn to Wegovy for Elementary School Kids

https://www.wsj.com/health/wellness/when-diets-dont-work-parents-turn-to-wegovy-for-elementary-sc...
2•JumpCrisscross•18m ago•0 comments

Show HN: Bowora – A launchpad for build-in-public founders

https://bowora.com
2•Nimaaksoy•22m ago•0 comments

Show HN: Appareo – For when you know what you want to say but can't write it

https://www.appareo.ink/
3•ShaunakInamdar•23m ago•0 comments

You Have the Pieces. Now Build It

https://www.theidentityunderground.com/post/you-already-have-the-pieces-now-build-it
2•mooreds•24m ago•0 comments

Instagram sued over illegal gambling ads in the Nederland

https://nltimes.nl/2026/06/22/instagram-sued-illegal-gambling-ads-featuring-virgil-van-dijk-ronaldo
4•giuliomagnifico•25m ago•0 comments

Llama-dash – One go-to control plane for local inference

https://llama-dash.dev
2•ndom91•26m ago•1 comments

The Things We Share

https://codeplusconduct.substack.com/p/the-things-we-share
2•mooreds•27m ago•0 comments

How Accurate Is Professor Jiang?

https://predictivehistory.com/prediction-tracker/
3•mooreds•28m ago•1 comments

Any Sufficiently Large Lookup Table Must Be Conscious

https://julianrdcosta.substack.com/p/any-realizable-implementation-of
2•Anon84•29m ago•0 comments