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

I Solved My Mystery Fatigue with AI

https://metalearn.substack.com/p/i-solved-my-mystery-fatigue-with-ai
1•staticshock•27s ago•0 comments

Why Algo Traders Club Is Moving from Hyperliquid to Kalshi

https://www.algotradersclub.com/blog/why-algo-traders-club-is-moving-from-hyperliquid-to-kalshi
1•fode•2m ago•0 comments

Telo confirms 400 kW sustained charging for its tiny electric truck

https://electrek.co/2026/06/19/telo-confirms-400-kw-sustained-charging-tiny-electric-truck/
1•breve•5m ago•0 comments

Efficient C++ Programming for Modern C++ CPUs, Chapter 4/part 2

https://6it.dev/blog/infographics-operation-costs-in-cpu-clock-cycles-take-2-80736
1•birdculture•5m ago•0 comments

Out of Stealth (Kinda)

https://github.com/Egoist-Machines/LodeDB
1•erinmeryl•6m ago•0 comments

Kahneman: Theory Induced Blindness

https://safetyinsights.org/2026/02/16/daniel-kahneman-theory-induced-blindness/
1•Jimmc414•8m ago•0 comments

Show HN: Agentcard – virtual cards for AI agents, now with DoorDash checkout

https://www.agentcard.sh
1•pipeabello•10m ago•0 comments

How to avoid street violence, by a professional kickboxer

https://www.youtube.com/watch?v=Q8Vk9KvLD3Q
1•nailer•10m ago•0 comments

Show HN: P34 – tabular profit prediction without the optimism bias

https://hyperc.com/preview/index.html
1•grandrew•10m ago•0 comments

Lump Sum vs. DCA comparison: LS wins or does it?

https://hduynam99.substack.com/p/lump-sum-vs-dca-comparison-ls-wins
1•hoangthuytrang•11m ago•0 comments

Cursor Is Now SpaceX: Enterprise Agentic Coding's New Lock-In Risk

https://superml.dev/spacex-cursor-enterprise-agentic-coding-lock-in-risk-2026
1•bps1418•12m ago•0 comments

Backstitch: Real-Time Version Control for Godot

https://backstitch.dev/
1•coinfused•20m ago•0 comments

Swedish VPN provider OVPN sold to US stock and asset company

https://www.ovpn.com/en/privacy-notice
3•hackedoffnews•22m ago•2 comments

We built a lab to evaluate data agents – Hex

https://hex.tech/blog/evaluate-data-agents/
2•haritha1313•25m ago•0 comments

Speculation Is All You Need

https://modal.com/blog/spec-is-all-u-need
4•charles_irl•30m ago•0 comments

Kernhelm: A Linux authority wall for untrusted agents

https://github.com/Deso-PK/make-trust-irrelevant/blob/main/Make-Trust-Irrelevant
1•DesoPK•31m ago•0 comments

QuadRF, a modular 4x4 MIMO beamforming tile built with an open antenna arch

https://www.youtube.com/watch?v=zdJ9Tbm8ALg
1•tekacs•31m ago•0 comments

Tradeoff Between Expertise and Flexibility: A Cognitive Entrenchment Perspective

https://www.jstor.org/stable/29765006
1•Jimmc414•34m ago•1 comments

Hey, N00B, We Didn't Hire You to Complete Tasks

https://newsletter.kentbeck.com/p/hey-n00b-we-didnt-hire-you-to-complete
23•rrvsh•37m ago•4 comments

Fiber Optic Drones

https://www.army.mil/article/287737/fiber_optic_drones_posing_a_significant_c_uas_challenge
1•Stevvo•38m ago•0 comments

To Pay Rent in Medieval England, Catch Some Eels

https://www.atlasobscura.com/articles/medieval-eel-rent-map-england
1•ohjeez•39m ago•1 comments

Cirrus: ATProto Personal Data Server That Runs on Cloudflare Workers

https://github.com/ascorbic/cirrus
1•gurjeet•43m ago•0 comments

Tell HN: Adding congestion control and retry tokens to a reliable UDP transport

2•x1colegal•43m ago•0 comments

Einstellung Effect

https://en.wikipedia.org/wiki/Einstellung_effect
2•Jimmc414•43m ago•0 comments

Hilarious Math Memes That Prove Mathematics Is Both Pain and Fun

https://yipzap.com/hilarious-math-memes-that-prove-mathematics-is-both-pain-and-fun/
1•yututu•47m ago•0 comments

How to Keep SEO Traffic When You Redesign Your Website

https://repaint.com/blog/website-redesign-seo
2•izakfr•50m ago•0 comments

Aikido Code Audit

https://www.aikido.dev/blog/introducing-code-audit-find-complex-vulnerabilities-hidden-in-your-co...
2•ilreb•53m ago•0 comments

In 1954, engineers shrank a transistor radio into something people could carry

https://economictimes.indiatimes.com/news/international/us/in-1954-engineers-shrank-a-transistor-...
2•dredmorbius•54m ago•1 comments

Claude Monet

https://www.claudemonetgallery.org/
1•andsoitis•55m ago•0 comments

Show HN: Unpuzzld – escape-room style puzzles you can share with a QR code

https://unpuzzld.com
1•4umfreak•56m ago•1 comments