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

What You Gain by Building Your Own Game Engine

https://eliasfarhan.ch/gamedev/cpp/2026/08/14/srnative-01-why-a-custom-engine.html
1•kwakwa_cat•50s ago•0 comments

CAKE: Compiler-Agent Co-Design for Frontier Kernel Evolution

https://arxiv.org/abs/2608.12629
1•matt_d•1m ago•0 comments

Niteshift.dev – The full-stack cloud for coding agents

https://niteshift.dev
1•ishener•1m ago•0 comments

Memory failure predicted by attention lapsing and media multitasking

https://www.nature.com/articles/s41586-020-2870-z
1•u1hcw9nx•2m ago•0 comments

Jason Arday Found Dead

https://www.telegraph.co.uk/gift/9d2ca09b7c07688a
1•theanonymousone•2m ago•0 comments

The Mysterious Syndrome Destroying Endurance Athletes

https://www.outsideonline.com/health/training-performance/running-empty/
1•cwwc•2m ago•0 comments

Ontario Launches Data Centre Playbook

https://news.ontario.ca/en/release/1007871/ontario-launches-data-centre-playbook
1•ChrisArchitect•3m ago•0 comments

Trump administration cancels Biden-era power line construction efforts

https://thehill.com/policy/energy-environment/6028881-energy-dept-scraps-transmission-corridors/
1•gok•3m ago•0 comments

How to Get Rich in America

https://kyla.substack.com/p/how-to-get-rich-in-america
1•cwwc•4m ago•0 comments

How Claude's text watermarking works

https://www.anthropic.com/news/claude-text-watermark
1•surprisetalk•5m ago•0 comments

Agentic OT system for plant operations

https://app.valak.ai
1•mickymultani•5m ago•1 comments

Bluehouse: Ingesting a social network and getting the vibe

https://oleander.dev/bluehouse
1•phixMe•6m ago•0 comments

Tescreal

https://en.wikipedia.org/wiki/Main_Page
1•dgellow•6m ago•0 comments

Counting push-ups live with iOS: brightness, Apple pose, then an LSTM

https://www.bdywrk.app/blog/blind-at-the-bottom
1•studiobokehai•7m ago•0 comments

I know how to talk to God and Hear them, too

https://www.CosmicGovernmentsAmbassador.com/
1•Lbesecker195•7m ago•0 comments

Mama Saturn's Virtual Concert [video]

https://www.youtube.com/watch?v=i2XUrySbdUE
1•consumer451•8m ago•1 comments

High-Performance Array-Backed LRU Hash Table

https://github.com/adanil-code/LRUHashTable
2•adanil_•9m ago•0 comments

Data-eng-bench, Snowflake's data engineering benchmark for agents

https://github.com/Snowflake-Labs/data-eng-bench
1•marcociavarella•10m ago•0 comments

The Great Logistics Mosaic: Who Is Truly Constructing the US ECom Parcel Network

https://chinesellers.substack.com/p/the-great-logistics-mosaic-who-is
1•iamnothere•11m ago•0 comments

Demo for Parameter Sniffing and Memory Grant Feedback

https://marlonribunal.com/demo-for-parameter-sniffing-and-memory-grant-feedback/
1•MarlonPro•11m ago•0 comments

ActivityPub Won by Being Boring

https://o.ee/blog/activitypub-won-by-being-boring/
2•speckx•12m ago•2 comments

The Waldo Moment

https://en.wikipedia.org/wiki/The_Waldo_Moment
1•cs702•12m ago•0 comments

Ask HN: What are you building with Mojo lang?

1•maxchisto•13m ago•0 comments

Open WireGuard Endpoints

https://proxylity.com/articles/now-available-open-wireguard-endpoints-and-async-lambda.html
1•mlhpdx•15m ago•0 comments

OpenAI talent exodus raises 'huge red flag' ahead of IPO

https://www.cnbc.com/2026/08/14/open-ai-ipo-red-flag.html
3•DGAP•15m ago•0 comments

Why did I build a product no one needs?

https://metedata.substack.com/p/017-why-did-i-build-a-product-no
1•young_mete•16m ago•0 comments

How AI is changing how I build software with Simon Willison, on Talking Postgres

https://talkingpostgres.com/episodes/how-ai-is-changing-software-development-with-simon-willison
2•clairegiordano•16m ago•0 comments

Omarchy Quattro [video]

https://www.youtube.com/watch?v=F7fe9pa8OeE
2•nomilk•17m ago•0 comments

Firefox is now the last major browser that still supports uBlock Origin

https://www.pcworld.com/article/3212428/firefox-is-now-the-last-major-browser-that-still-supports...
10•DemiGuru•17m ago•2 comments

Cloudflare for Government Achieves FedRAMP Class D (High) Certified

https://blog.cloudflare.com/fedramp-class-d-certification/
2•cebert•18m ago•0 comments