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

Reading the tea leaves: 2026 predictions

https://artificialconfidence.com/p/reading-the-tea-leaves-2026-predictions
2•mooreds•1m ago•0 comments

You don't have to be smart if you can think clearly

https://www.seangoedecke.com/you-dont-have-to-be-smart-if-you-think-clearly/
3•meetpateltech•10m ago•0 comments

GrapheneOS Statement on Hidden Profiles

https://xcancel.com/GrapheneOS/status/2082153517234676150#m
3•Cider9986•10m ago•0 comments

GCC AI Policy

https://gcc.gnu.org/pipermail/gcc/2026-July/248628.html
3•edelsohn•15m ago•0 comments

Steve Jobs emails himself (2010)

https://twitter.com/TechEmails/status/1567712985979707393
2•downbad_•23m ago•0 comments

Does every question mark deserve a Betteridge?

https://dynomight.net/betteridge/
3•zdw•23m ago•1 comments

The Best Debugging Story I've Ever Heard (2010)

https://patrickthomson.tumblr.com/post/2499755681/the-best-debugging-story-ive-ever-heard
2•downbad_•23m ago•0 comments

Ailments: A field guide to potential Al-induced cognitive-behavioural disorders

https://informationisbeautiful.net/visualizations/ai-induced-mental-disorders-ai-mental-health-gl...
2•zdw•25m ago•0 comments

Hooray for the Sockets Interface

https://blog.apnic.net/2026/07/28/hooray-for-the-sockets-interface/
3•jruohonen•27m ago•0 comments

The BBC Tetris Companion

https://www.leadedsolder.com/2026/07/28/bbc-bridge-companion-part-1-overview.html
2•zdw•28m ago•0 comments

SpaceXAI sues Minnesota AG over ban on nudifying apps

https://gizmodo.com/grok-creator-spacexai-sues-minnesota-ag-to-stop-ban-on-nudification-2000792143
4•pseudosavant•29m ago•0 comments

Show HN: Lean4 Datalog DSL Based on Google Zanzibar for AI Projects

https://github.com/jagg-ix/zil-lean
2•kbradero•31m ago•0 comments

Ask HN: What agentic AI ad optimization tool do you use?

2•smb06•32m ago•0 comments

Show HN: AiTextToHandwriting] – Text to Handwriting Converter

https://aitexttohandwriting.com/
2•zhou594660747•40m ago•0 comments

France Approves Automated, Real-Tim

https://torrentfreak.com/france-approves-automated-real-time-blocking-of-pirate-sports-streams/
2•gslin•41m ago•0 comments

Show HN: SeaTicket – Duplicate Bug Finder for GitHub

4•Daniel-Pan•41m ago•0 comments

Show HN: MegaDSP an effects plugin for DAWs with 50 effects

4•locusofself•44m ago•0 comments

Bartz et al. vs. Anthropic PBC

https://dockets.justia.com/docket/california/candce/3:2024cv05417/434709
2•uneven9434•49m ago•0 comments

Revealed: The Authors Whose Pirated Books Are Powering Generative AI (2023)

https://www.theatlantic.com/technology/archive/2023/08/books3-ai-meta-llama-pirated-books/675063/
3•uneven9434•51m ago•0 comments

The tired you can't explain

https://nathanielfishel.substack.com/p/the-tiredness-you-cant-explain-to
3•bigfish2026•55m ago•0 comments

Satyress "Threehalves Superhumanoid General Purpose Robot"

https://www.satyress.com/
5•King-Aaron•57m ago•3 comments

Chip stocks slide in US and Asia as AI jitters rattle investors

https://www.bbc.com/news/articles/cly8zng43npo
3•yogthos•57m ago•0 comments

Pakistan accused of fatally shooting 30 unarmed protesters in Kashmir

https://www.theguardian.com/world/2026/jul/28/pakistan-accused-firing-unarmed-protesters-kashmir-...
2•Cider9986•57m ago•0 comments

Trump administration bans new Chinese humanoid robots

https://www.bbc.com/news/articles/cp9e2ex3ekyo
12•BIackSwan•58m ago•7 comments

New sw dev tool for safe local AI usage

https://github.com/alexs60/safe-sde
2•alexfg93•59m ago•0 comments

Open AI announces two new models- GPT-transcribe and GPT-live-transcribe

https://developers.openai.com/api/docs/models/gpt-transcribe
2•rochansinha•1h ago•0 comments

LearnVector – Andrew Ng's AI company building one‑to‑one learning experiences

https://learnvector.ai/
27•ajhai•1h ago•14 comments

Autoclaw

https://autoclaw.z.ai/
3•qainsights•1h ago•1 comments

I Built a Free AI Pain Point Miner

https://github.com/joatsaint/pain-point-miner
2•movieman32•1h ago•0 comments

Ask HN: How many AI agents do you actively use?

2•rjpruitt16•1h ago•6 comments