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

A Deep Dive into LDS Optimizations on AMD Instinct MI450 GPUs

https://rocm.blogs.amd.com/software-tools-optimization/mi450-lds-optimization/README.html
1•matt_d•2m ago•0 comments

Combinatorial Implosion

https://royalicing.com/2026/combinatorial-implosion
1•burntcaramel•3m ago•0 comments

Google Antigravity introduces Boost deep reasoning (/boost)

https://antigravity.google/docs/boost/
1•simonpure•6m ago•0 comments

Anthropic signs $35B cloud deal with Nvidia-backed Lambda, source says

https://www.thestar.com.my/tech/tech-news/2026/09/01/anthropic-signs-35-billion-cloud-deal-with-n...
1•geoffbp•6m ago•0 comments

Duane Davis guilty in murder of Tupac Shakur

https://abcnews.com/US/jury-begins-deliberating-trial-murder-tupac-shakur/story?id=136099547
1•colinprince•10m ago•1 comments

Expansion at China's 'Area 51'

https://www.twz.com/news-features/chinas-area-51-is-undergoing-a-massive-expansion
1•Gaishan•11m ago•0 comments

California Lawmakers Pass Plug-In Solar Bill

https://www.nytimes.com/2026/08/27/business/energy-environment/california-legislature-plugin-sola...
5•lxm•14m ago•1 comments

Is MCP Good Yet?

https://ismcpgoodyet.com
1•handfuloflight•15m ago•0 comments

I was sick of $99 directory scams, so I built a fair 10-min rotation launchpad

https://spotmy.app/
1•ricotouring•16m ago•0 comments

Not Becoming a Cyborg

https://nolanlawson.com/2026/08/31/on-not-becoming-a-cyborg/
1•Refreeze5224•16m ago•0 comments

PokeVS – Guess the taller Pokémon, battle stats

https://poke-vs.com
1•AdamRichic•16m ago•0 comments

Retiring from the Project (Vv221)

https://lists.debian.org/debian-devel/2026/08/msg00318.html
1•OsrsNeedsf2P•18m ago•1 comments

Fastpotify

https://fastpotify.rocks/
2•nreece•19m ago•0 comments

GTA 6's Relationship Mechanic Is 'Cheating' on Your Real-Life Partner and Break

https://www.ign.com/articles/gta-6s-relationship-mechanic-is-cheating-on-your-real-life-partner-a...
1•FannyJoeStyles•19m ago•0 comments

Astronomers detect fastest known star in Milky Way

https://www.theguardian.com/science/2026/aug/19/astronomers-detect-fastest-known-star-in-milky-wa...
1•gmays•20m ago•0 comments

Ask HN: Why does HN hide the best comments and promote the worst?

1•RepResetNow•21m ago•1 comments

Tailcat: Tailscale Without Tailscale, by Tailscale

https://tailscale.com/blog/tailcat
2•ricochet11•24m ago•0 comments

FTC, States Sue Amazon over Secret Ad Surcharge Scheme

https://www.ftc.gov/news-events/news/press-releases/2026/08/ftc-states-sue-amazon-over-secret-ad-...
2•js2•27m ago•0 comments

Why Cargo's Yank Warning Became the Attack

https://medium.com/@chinmayshringi4/why-cargos-yank-warning-became-the-attack-74ec06042e8a
1•syumei•28m ago•0 comments

Ex-Crips leader found guilty in 1996 murder of rapper Tupac Shakur

https://www.bbc.com/news/articles/c24j5192j7jo
35•1659447091•31m ago•10 comments

China's CXMT Begins Production of Its HBM3E Memory

https://www.reuters.com/world/asia-pacific/chinas-cxmt-makes-breakthrough-advanced-memory-chips-i...
1•yogthos•33m ago•0 comments

Show HN: A Curated Library of Hero Sections from Fast-Growing Startups

https://www.herotxt.page/
1•lynn_xx•35m ago•0 comments

How My Students Think About AI

https://www.lesswrong.com/posts/ySXuvJcqRindQwAk7/how-my-students-think-about-ai
4•pella•36m ago•0 comments

Tell HN: Remember to Change Your Filters

2•surprisetalk•36m ago•1 comments

Mortal AGI via ICA/PCA Rep-Grids Replacing Currency with Local Infrastructure

http://ingridx.dynu.net/Substack/Mortal-AGI.html
1•jimekus•40m ago•0 comments

Logic and the 2-Simplicial Transformer (2019)

https://arxiv.org/abs/1909.00668
1•wslh•42m ago•0 comments

RotaryCell: Making an unmodified rotary phone work over LTE with an ESP32-S3

https://github.com/fregacmols/RotaryCell
3•jombib•42m ago•1 comments

A composer published a paper on theoretical physics

https://retractionwatch.com/2026/08/05/a-composer-published-a-paper-on-theoretical-physics-his-la...
2•thunderbong•43m ago•0 comments

Why Google Stores Billions of Lines of Code in a Single Repository (2016)

https://dl.acm.org/doi/fullHtml/10.1145/2854146
1•diwash007•47m ago•1 comments

Curl Performance Tests

https://curl.se/perf/
2•theanonymousone•49m ago•0 comments