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

Are you better than the screen watchers?

https://sailsandcommas.com/2026/05/30/are-you-better-than-the-screen-watchers/
1•Curiositry•4m ago•0 comments

Cloudflare launched self-managed OAuth for all

https://blog.cloudflare.com/oauth-for-all/
1•terryds•4m ago•0 comments

Libaui – Tk clone in XCB and C

https://github.com/onanaxm/libaui
2•onuelito•6m ago•0 comments

Zombie unicorns are haunting Silicon Valley

https://www.economist.com/business/2026/06/21/zombie-unicorns-are-haunting-silicon-valley
1•andsoitis•6m ago•1 comments

Electronics can now be printed onto living tissues

https://www.economist.com/science-and-technology/2026/06/24/electronics-can-now-be-printed-onto-l...
1•andsoitis•8m ago•0 comments

Scbkr – an owner-signed responsibility-chain workbench for local LLMs

https://github.com/HIJO790401/scbkr-local-responsibility-model
1•look888•10m ago•0 comments

SystemVerilog

https://en.wikipedia.org/wiki/SystemVerilog
1•handfuloflight•15m ago•0 comments

Accidental Anonymity

https://macwright.com/2026/06/24/accidental-anonymity
1•maxutility•17m ago•0 comments

Mr. Big (Police Procedure)

https://en.wikipedia.org/wiki/Mr._Big_(police_procedure)
1•killingtime74•19m ago•0 comments

Duolicious – Open-source dating app

https://github.com/duolicious/duolicious
2•roger_penrose•19m ago•0 comments

TronBrowser is an open-source, privacy-first, AI-native web browser

https://tronbrowser.dev/
1•buffer_overlord•22m ago•1 comments

Remembering the life and artwork of Ron Spears

https://magic.wizards.com/en/news/feature/remembering-the-life-and-artwork-of-ron-spears
1•WalterGR•31m ago•0 comments

Writers and Drugs

https://lithub.com/are-writers-intrinsically-vulnerable-to-alcohol-and-drugs/
3•dang•33m ago•0 comments

The effortless genius of Super Mario 64

https://ravi64.com/messi-effortless-genius-super-mario-64/
1•merlioncity•35m ago•0 comments

Paintings by Adolf Hitler

https://en.wikipedia.org/wiki/Paintings_by_Adolf_Hitler
3•num42•38m ago•0 comments

Bible as RAG Database

https://www.crosscanon.com/
20•jacksonastone•40m ago•10 comments

Bitcoin hits 20-month low as market sentiment sours

https://www.ft.com/content/41d1da8f-e1a8-4953-9d89-a8caa84cd26c
6•1vuio0pswjnm7•40m ago•0 comments

The Microsoft Store on Windows 11 is great now (2025)

https://www.windowscentral.com/microsoft/windows-11/the-microsoft-store-on-windows-11-is-actually...
1•kristianp•41m ago•0 comments

Golden Boot – Club Impact Tracker

https://golden-boot-club-impact.vercel.app/
2•saq7•44m ago•1 comments

Tech companies dealing with data center protests locally fighting losing battle

https://fortune.com/2026/06/22/data-center-opposition-goes-national-despite-only-8-percent-living...
2•1vuio0pswjnm7•45m ago•0 comments

Exploring the internal representations of Pangram 3.3.2

https://www.pangram.com/pangram-space
8•krackers•46m ago•1 comments

The Harvard Data Nerd Defending America's Goal at the World Cup

https://www.wsj.com/sports/soccer/matt-freese-goalkeeper-usa-world-cup-495d3f0a
1•pondsider•46m ago•0 comments

The Carwash Problem: Why Your IT Organization Isn't Ready for AI-Generated Code

https://atkatana.com/blog/hyper-loops-draft.html
1•atkatana•49m ago•0 comments

World-first burn treatment performed at leading Canadian hospital

https://www.hamiltonhealthsciences.ca/share/news-world-first-burn-15june26/
1•BiraIgnacio•50m ago•0 comments

Europe Became the World Champion of Heat Deaths

https://maartenboudry.substack.com/p/how-europe-became-the-world-champion
1•osnium123•59m ago•0 comments

Calling everything AI-generated is lazy

https://00f.net/2026/06/25/stop-calling-everything-ai-generated/
3•anotherevan•1h ago•1 comments

RealTalk – a growth agent that pushes Slack/SMS alerts instead of a dashboard

https://www.realtlkk.com/
1•Quise•1h ago•0 comments

Noctis, an open-source music player for local libraries

https://noctisapp.cc/
1•heartached•1h ago•0 comments

Ending All Respiratory Infections

https://blog.interceptfund.com/p/ending-respiratory-infections
25•EthanFantl•1h ago•3 comments

A Special Wireless-Free Nikon Camera Is Publicly Available for the First Time

https://petapixel.com/2026/06/24/a-special-wireless-free-nikon-camera-is-publicly-available-for-t...
2•HardwareLust•1h ago•1 comments