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

Turning Quick Notes into Long-Term AI Memory

https://barbarito.me/notes-workflow/
1•danbarbarito•1m ago•0 comments

MCP server for 340k SVG icons

https://github.com/LeulAria/Aria-Icons
1•leularia•11m ago•0 comments

Urban congestion relief experiments through routing-app interventions

https://www.nature.com/articles/s44284-026-00443-x
1•neehao•11m ago•0 comments

Tesla killing Solar Roof is leaving installers with six-figure losses

https://electrek.co/2026/09/01/tesla-solar-roof-exit-installers-losses/
6•voxadam•20m ago•0 comments

Selected GitHub Copilot models deprecated

https://github.blog/changelog/2026-08-31-selected-github-copilot-models-deprecated/
1•mooreds•21m ago•0 comments

My Mac Mini fits one model. I run five

https://placona.co.uk/my-mac-mini-fits-one-model/
4•makaimc•22m ago•0 comments

Replaceable but Employed: Automation and the Meaning of Work

https://www.nber.org/papers/w35559
2•mooreds•23m ago•0 comments

AI Cold Showers

https://allan.reyes.sh/posts/ai-cold-showers/
2•mooreds•23m ago•0 comments

US Military disabled ad tracking on troops' devices after targeted attacks

https://techcrunch.com/2026/09/04/us-military-disabled-ad-tracking-on-troops-devices-following-re...
5•jethronethro•24m ago•0 comments

Decoherence: A card game for two based on quantum physics

https://decoherance.vaguespac.es/
1•thebigship•27m ago•0 comments

Scaling Engineering: Ownership over Hiring

https://greenido.dev/2026/06/11/what-changes-at-20-50-and-200-engineers/
1•fagnerbrack•28m ago•0 comments

Free WhatsApp abandoned cart recovery for WooCommerce

https://wordpress.org/plugins/6rsh-messaging-notifications/
1•sixrsh•28m ago•0 comments

Botsitting: The Unpaid Labour Behind Every AI Productivity Claim

https://smarterarticles.co.uk/botsitting-the-unpaid-labour-behind-every-ai-productivity-claim
1•dxs•29m ago•0 comments

Code at the Speed of Understanding

https://dennisy.me/notes/code-at-the-speed-of-my-understanding
1•dennisy•31m ago•0 comments

Secret Collusion Among AI Agents

https://arxiv.org/abs/2402.07510
2•phaseonebig•31m ago•0 comments

Amy – high performance fixed-point music synthesizer library

https://github.com/shorepine/amy
1•anigbrowl•32m ago•0 comments

Show HN: Animating code snippets from first principles

1•rahulrav•33m ago•0 comments

Show HN: Expose - a self-hosted tunneling tool like ngrok/localtunnel(Golang)

https://github.com/kernelshard/expose
2•samiulsk•33m ago•0 comments

Alzheimer's treatment is advancing rapidly

https://www.vox.com/the-highlight/501710/alzheimers-disease-dementia-test-treatment-medication-in...
2•dabinat•34m ago•1 comments

The Foundations of Modern AI: Generalization, Data Selection, and Epiplexity

https://www.youtube.com/watch?v=lKoJJxjUfdw
1•E-Reverance•35m ago•0 comments

Ask HN: How do you know a prompt is "complex" for an AI model?

1•faryadz•35m ago•0 comments

CPAN Uploads Are Up 50% Year-over-Year

https://www.olafalders.com/2026/09/04/cpan-uploads-up-50-percent-year-over-year/
1•Amorymeltzer•36m ago•0 comments

Watch Los Angeles get built, one building at a time (1880–2026)

https://lax-skyline.parcelscope.net/
34•rustywasm•37m ago•8 comments

"Twenty years of brand building froze in time": How coding agents select tools

https://thenewstack.io/coding-agents-tool-choice/
2•theanonymousone•37m ago•0 comments

The Context Engine

https://productnow.ai/blogs/the-context-engine
1•kadhirvelm•37m ago•1 comments

Agentic Coding in the Wild

https://kstark007.github.io/blog/agentic-coding-in-the-wild/
2•maknee•38m ago•0 comments

All 32 NFL stadiums ranked by total game day cost

https://visityourteam.com/nfl/rankings/game-day-costs
1•brambleworks•49m ago•0 comments

Senate Considers Letting Contractors Hack Computers for Military

https://www.bloomberg.com/news/articles/2026-09-03/senate-considers-allowing-contractors-to-condu...
3•_____k•50m ago•0 comments

OSB Runs locally on Mobile Devices, now we are Fundraising

https://whydonate.com/fundraising/seeking-startup-funding
1•opensb•52m ago•1 comments

The Appeal

https://sunilpai.dev/posts/the-appeal/
1•tosh•53m ago•0 comments