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•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

What a Joke: GitHub Copilots Token Based Billing Spurs Consternation

https://techcrunch.com/2026/05/30/what-a-joke-github-copilots-new-token-based-billing-spurs-const...
1•meander_water•2m ago•0 comments

Russia's spies seek Western technology as sanctions bite

https://apnews.com/article/russia-sanctions-intelligence-economy-defense-10ea5ad20158945f18c71837...
1•HelloUsername•5m ago•0 comments

A pragmatic set of modern colour space transforms for the Odin language

https://github.com/heavyrain266/colourspace
1•HeavyRain266•6m ago•0 comments

Show HN: Fast, branchless single/multithreaded Quicksort for C/C++

https://github.com/chkas/blqsort
1•chrka•6m ago•0 comments

Move over, AlphaFold: open-source model predicts shape of 1B proteins

https://www.nature.com/articles/d41586-026-01686-3
3•limbicsystem•7m ago•0 comments

CEPI fast-tracks three Bundibugyo ebolavirus vaccine candidates

https://cepi.net/cepi-fast-tracks-three-bundibugyo-ebolavirus-vaccine-candidates
1•berlianta•8m ago•0 comments

Context is essential for AI agents, but I think shared state is the next problem

https://github.com/Abloatai/ablo
1•lukasanderss•8m ago•0 comments

The Swiss canton where cars had to be pulled by horses

https://www.swissinfo.ch/eng/swiss-oddities/a-curious-quirk-of-democracy-the-graub%c3%bcnden-car-...
1•giuliomagnifico•10m ago•0 comments

Pluto – An x86 (Ring 0, Protected Mode) kernel written in Zig

https://github.com/ZystemOS/pluto
1•peter_d_sherman•11m ago•1 comments

A compressed-spring model of spiral galaxy formation (initial email version)

https://theeggandtherock.com/p/a-compressed-spring-model-of-spiral
1•surprisetalk•12m ago•0 comments

Work from Home and Disability Employment

https://www.aeaweb.org/articles?id=10.1257/aeri.20240538
2•healsdata•13m ago•0 comments

Linux 7.2 Proceeding to Deprecate Af_alg Due to "Massive Attack Surface"

https://www.phoronix.com/news/Linux-AF-ALG-Deprecation
2•awkwardpotato•18m ago•0 comments

When AI Crosses the Line: The Matplotlib Incident

https://members.sigmazero.cc/posts/when-ai-crosses-159174096?postId=when-ai-crosses-159174096
5•sigmazero•19m ago•2 comments

MiniMax M3 Benchmarks One Pager

https://filecdn.minimax.chat/public/img_v3_02128_b7726cd8-879a-4b7a-a9da-db4395ea597g-17802725086...
1•kirtivr•20m ago•1 comments

MacBook Pro Rival with the Nvidia Powered Surface Laptop Ultra

https://www.windowslatest.com/2026/06/01/microsoft-builds-its-ultimate-macbook-pro-rival-with-the...
4•jbk•23m ago•1 comments

Why doesn't the Ubuntu 26.04 Installer allow you to create Btrfs subvolumes?

https://www.niladicpodcast.com/2026/05/23/how-to-setup-ubuntu-26.04-btrfs/
1•Siecje•24m ago•0 comments

Picomemo 1.2.0 – Portable OMEMO implementation in C

https://github.com/mierenhoop/picomemo/releases/tag/1.2.0
1•neustradamus•25m ago•0 comments

You Must Fix Your Asserts (Zig)

https://kristoff.it/blog/fix-your-asserts/
3•signa11•27m ago•0 comments

Autonomous Product Development: shipping fixes with no human in the loop

https://www.willtay.com/autonomous
2•wrftaylor•27m ago•0 comments

FTSE 100's likely new entrant puts a British spin on the AI boom

https://www.ft.com/content/19330d92-fee6-4ddf-95f5-98f005061c0b
1•mmarian•28m ago•0 comments

Send the wallet, not just coins –- like an envelope

https://hackenproof.com/blog/for-hackers/send-the-wallet-not-just-the-coins-like-an-envelope
2•mybucks_online•29m ago•0 comments

Zen: A distraction-free code editor based on Zed

https://codeberg.org/arendjr/zen
1•arendjr•29m ago•2 comments

Learn SQL Once, Use It for 30 Years

https://fagnerbrack.com/learn-sql-once-use-it-for-30-years-9aceb0bdee03
2•signa11•29m ago•0 comments

More Time to Think

https://ma.ttias.be/more-time-to-think/
2•Mojah•30m ago•0 comments

Proofs as Programs

https://systemsthinkingcollection.substack.com/p/proofs-as-programs
2•InputName•32m ago•0 comments

Whoa Now: Cautionary Tales from Materials Science

https://www.science.org/content/blog-post/whoa-now-cautionary-tales-materials-science
1•rantingdemon•33m ago•0 comments

GitHub removed the old copilot multipliers on a pricing page

https://docs.github.com/en/copilot/reference/copilot-billing/request-based-billing-legacy/model-m...
2•adrianvi•34m ago•2 comments

I built a free Mac app to clear browser cache, cookies, and history in one click

https://cacheout.app/
1•jimmitchell•34m ago•0 comments

The Grate Cheese Robbery

https://longreads.com/2026/05/28/the-cheese-theft-food-crime/
1•mooreds•34m ago•0 comments

France backed by Britain intercepts sanctioned oil tanker sailing from Russia

https://www.france24.com/en/france/20260601-france-and-allies-intercept-sanctioned-russian-oil-ta...
1•mooreds•35m ago•0 comments