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

Ask HN: Are investors still investing into tech?

1•willwade•4m ago•0 comments

Show HN: Acplause – An ACP agent for OpenAI-compatible APIs

https://github.com/anesthetised/acplause
1•anesthetised•7m ago•0 comments

Features

https://www.anthropic.com/news/features
1•surprisetalk•9m ago•1 comments

Space X and Tesla exploring merger, CEO Elon Musk says

https://www.axios.com/2026/10/20/spacex-tesla-merger-talks
2•FireBeyond•19m ago•2 comments

In Hilbert space, all things are quantumly possible

https://www.quantamagazine.org/in-hilbert-space-all-things-are-quantumly-possible-20260826/
2•unprovable•20m ago•0 comments

Video Game Reverse Engineering Community Shuts Down

https://www.404media.co/video-game-reverse-engineering-community-shuts-down-because-ai-has-made-i...
1•colinprince•22m ago•0 comments

Merging SpaceX and Tesla would be a "good idea," Musk says

https://arstechnica.com/space/2026/10/spacex-and-tesla-into-a-single-company-has-a-lot-of-merit-m...
1•ramn7•23m ago•1 comments

OpenAI CLI – Official CLI for the OpenAI API

https://github.com/openai/openai-cli
1•git_watcher99•23m ago•0 comments

Is Complexity an Illusion? (2024)

https://arxiv.org/abs/2404.07227
2•the-mitr•24m ago•0 comments

OpenAI – 12 hour cache (API) available and "cache forever" for work/codex users

https://twitter.com/thsottiaux/status/2112712984644784534
1•jofzar•24m ago•2 comments

Show HN: Litedeck – Agentless server management GUI over plain SSH

https://github.com/cpprhtn/LiteDeck
2•cpprhtn•28m ago•0 comments

Show HN: Ida, the Mac assistant Siri should have been

https://www.heyida.ai/
1•FSALINAS26•29m ago•0 comments

NCM: Parallel Coarse-to-Fine Text Generation

https://hazyresearch.stanford.edu/blog/2026-10-12-ncm
1•modinfo•31m ago•0 comments

I wish you didn't want to see Nathan Fielder's Elizabeth Holmes documentary

https://www.statnews.com/2026/10/20/elizabeth-holmes-superpower-authenticity-vs-truth-matt-herper...
1•EA-3167•32m ago•3 comments

T3 Code now synced between GitHub and GitCafe

https://git.cafe/pingdotgg/t3code
6•versecafe•36m ago•15 comments

The Future of CSS

https://www.joshwcomeau.com/css/interop-2027/
4•soheilpro•37m ago•0 comments

Removing the Leap Second

https://www.scientificamerican.com/article/scientists-vote-to-end-leap-seconds-redefining-how-the...
1•thatxliner•37m ago•1 comments

GitHub package firewall

https://github.blog/changelog/2026-10-20-github-package-firewall-in-public-preview/
6•soheilpro•39m ago•0 comments

Indian CA's private keys compromised – one of them was the number '4'

https://www.theregister.com/security/2026/10/20/indian-certification-authority-emudhras-private-k...
3•alwa•39m ago•1 comments

Running Agent Factory for Months

https://medium.com/@deemwar/who-watches-the-agents-what-four-months-of-building-an-agent-factory-...
1•muthuishere•39m ago•0 comments

Good type against all odds

https://unsung.aresluna.org/good-type-against-all-odds/
18•firloop•39m ago•4 comments

Learning to live with Waymos

https://www.newyorker.com/magazine/2026/10/19/were-learning-to-live-with-waymos-its-going-weird
12•njrc•40m ago•2 comments

Guarantee Ukraine's Ballot, Not Just Its Border

https://anattalife.substack.com/p/guarantee-ukraines-ballot-not-just
1•hellothanks•43m ago•0 comments

SimCity 2000, in the style of OpenTTD

https://opensc2k.com/
1•ludde•43m ago•0 comments

Show HN: Unterm – A pure-Rust terminal for humans and AI agents

https://github.com/zhitongblog/unterm
1•zhitong45•45m ago•0 comments

Finland to Build a Million Landmines as Russian Threat Looms

https://www.twz.com/news-features/finland-plans-to-build-a-million-landmines-as-russian-threat-looms
3•nradov•47m ago•0 comments

Show HN: Gemma 4 26B at 100 tok/s on a Mac, using the Neural Engine and 2GB RAM

https://github.com/zw5/ane-fieldfare
1•daemon1123•49m ago•0 comments

The Gospel According to Peter (Thiel)

https://www.theverge.com/tech/1014252/peter-thiel-antichrist-lectures-analysis
2•srameshc•50m ago•2 comments

Cveelo – Turn your CV into a portfolio site, with hand-made templates

https://www.cveelo.com
1•aymen-annatar•51m ago•0 comments

Agentitter – a tiny plain-text social network you use through your AI agent

https://agentitter.com/
2•pontes•54m ago•0 comments