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

Offline FairPlay DRM Decryption

https://github.com/EthanArbuckle/fairplay-decrypt
1•sjtgraham•2m ago•0 comments

AI Keeps Getting Better. Why Is Its Writing Still So Bad?

https://greyenlightenment.com/2026/10/21/ai-keeps-getting-better-why-is-its-writing-still-so-bad/
1•paulpauper•4m ago•0 comments

The State of PyTorch 2026

https://techstrong.ai/articles/the-state-of-pytorch-2026/
1•CrankyBear•6m ago•0 comments

XRP Ledger Fixes Lending Code Before the Feature Goes Live

https://coinmarketcap.com/community/post/380272949/
1•joeymabia1•6m ago•1 comments

Intel tour by Dwarkesh: What will computer chips look like in 2045?

https://www.dwarkesh.com/p/intel-tour
1•osnium123•8m ago•0 comments

Untold: Iran

https://www.untoldart.com/venice
1•linuxkernal•10m ago•0 comments

Musk Giving Tops $445M in Midterm Election Push for GOP

https://www.bloomberg.com/news/articles/2026-10-23/musk-giving-tops-445-million-in-midterm-electi...
3•pulisse•10m ago•0 comments

Quest Diagnostics (Hacked)

https://www.questdiagnostics.com/links/quanum-notice
2•tortilla•11m ago•0 comments

PointerCam, a screen recorder that zooms on clicks and writes guides

https://pointercam.com/
1•rhrahul•12m ago•0 comments

A tale of two PHP remote vulnerabilities

https://calif.io/php2shell.x/
1•wyclif•12m ago•0 comments

Go++

https://github.com/jordan-bonecutter/go-plus-plus
1•jordan_bonecut•15m ago•1 comments

Physicists trap a single antimatter particle for a month For the first time

https://www.yahoo.com/news/science/articles/physicists-trap-single-antimatter-particle-150000058....
1•thunderbong•15m ago•0 comments

Demis Hassabis shortens AGI timeline from five to two to three years

https://the-decoder.com/deepmind-founder-hassabis-shortens-agi-timeline-from-five-to-two-to-three...
1•brandonb•17m ago•2 comments

Peter Thiel breaks with Trump over Iran war: 'We should not have done it'

https://www.politico.com/news/2026/10/21/peter-thiel-trump-iran-war-01131284
2•wslh•18m ago•0 comments

Assure – formal verification for every PR

https://symbolia.ai/
2•Veloc1te•19m ago•0 comments

Show HN: Supastack – Cross-Platform Turborepo for Next.js, Expo, and Tauri

https://supastack.dev
1•Learnmore_smart•20m ago•0 comments

CVE Tracker

https://cve.0xosprey.com/
1•mtweak•20m ago•0 comments

Tech's Enshittification, Public Markets, and Business Schools

https://tomorrowasusual.substack.com/p/techs-enshittification-public-markets
3•tudell•21m ago•1 comments

Show HN: GrillMyProfile – AI roast of your LinkedIn, scored against a job

https://www.grillmyprofile.com
1•luckeybearcreat•21m ago•0 comments

Dagger – Automation to build, test and ship; locally, in CI, or in the cloud

https://github.com/dagger/dagger
1•keyle•22m ago•0 comments

Is there any platform better than Talent Share for custom learning?

https://www.talent-share.com/
1•tlntshare45•25m ago•1 comments

Eric Trump–Backed Israeli Founder Flies Drones over End Zones and into War Zones

https://www.vanityfair.com/story/xtend-defense-drones-gaza
4•grandpajoey•29m ago•1 comments

MiniMaxAI/MiniMax-M3.1-Flash

https://huggingface.co/MiniMaxAI/MiniMax-M3.1-Flash
2•Philpax•31m ago•0 comments

1Password launches a way for AI to log in for you without seeing your password

https://techcrunch.com/2026/10/22/1password-launches-a-way-for-ai-agents-to-log-in-on-your-behalf...
1•willmarch•32m ago•1 comments

Home Prices Are Starting to Fall in Some Pockets of the U.S.

https://www.nytimes.com/2026/10/22/business/mortgage-rates-housing-costs.html
3•lxm•35m ago•1 comments

Canva's first in-house AI image model plans designs before generating them

https://www.theverge.com/ai-artificial-intelligence/1017151/canva-craft-in-house-ai-model
2•willmarch•37m ago•0 comments

Show HN: Most feature complete Apple notes MCP bridge

https://github.com/xiaofeng-han/apple-notes-mcp
1•hhhanxfus•40m ago•0 comments

Show HN: A Mandelbrot and Julia explorer in the browser using WebGPU

https://fractallens.com/fractals/
1•Ladi_M•40m ago•0 comments

Node2Shell: Node.js Brotli vulnerability allows remote code execution

https://www.aikido.dev/blog/node2shell-nodejs-brotli-rce-cve-2026-111497
3•Fordec•47m ago•0 comments

CVE-2026-109619 PHP Sentinel

https://github.com/Taz1920/php-sentinel
1•Ryantjbirdusnav•47m ago•1 comments