frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

I believe a whole generation of developers miss how open source used to work

https://twitter.com/mitsuhiko/status/2062181646804152626
1•tosh•55s ago•0 comments

Gooey: A GPU-accelerated UI framework for Zig

https://github.com/duanebester/gooey
1•ksec•1m ago•0 comments

Network State Propaganda

https://capirates.substack.com/p/theyre-telling-you-exactly-what-theyre
1•tjcrowley•1m ago•0 comments

The 15-minute city is a dead end

https://blogs.lse.ac.uk/covid19/2021/05/28/the-15-minute-city-is-a-dead-end-cities-must-be-places...
1•Anon84•3m ago•0 comments

Book of Cron Job [fiction]

https://www.nature.com/articles/d41586-026-01716-0
2•apotheosized•3m ago•0 comments

Show HN: Hive Trust – Ed25519-signed benchmarks for every AI inference primitive

https://thehiveryiq.com/trust/
1•thehivery•5m ago•0 comments

Knowable – Open-Source Personal AI Tutor on macOS

https://knowable.ca/
1•samuelzxu•6m ago•1 comments

See SBA Loans Around You

https://www.loanround.com
1•zarie•6m ago•0 comments

Safe Made Easy Pt.2: Don't Fear the Ref

https://ergeysay.github.io/safe-made-easy-pt2.html
2•ergeysay•7m ago•0 comments

I benchmarked Opus 4.8 vs. GPT 5.5 on 2 open source repos

https://www.stet.sh/blog/opus-48-vs-gpt-55-vs-opus-47-vs-composer-25
3•bisonbear•7m ago•0 comments

The Download: Trump's new AI order, and smart glasses for warfare

https://www.technologyreview.com/2026/06/03/1138322/the-download-trump-ai-order-smart-glasses-war...
1•joozio•8m ago•0 comments

10M requests in my bot black hole

https://gladeart.com/blog/10-million-requests-in-my-bot-black-hole-here-is-some-information
1•itsJustTrivial•9m ago•0 comments

Stats from 30K AI debates: Opus 4.7 is the most influential model

https://opper.ai/ai-roundtable/stats
5•felix089•9m ago•1 comments

How to Build an ML Framework in Rust, from Scratch, in a Weekend

https://www.erikkaum.com/blog/zml/index.html
1•tosh•11m ago•0 comments

NASA Says Farewell to Maven Mars Mission

https://www.nasa.gov/news-release/nasa-says-farewell-to-maven-mars-mission-hosts-media-call-today/
1•ironyman•11m ago•0 comments

Why open standards matter for AI infrastructure

https://openenvelope.org/writing/open-standards-ai-infrastructure/
1•ashconway•12m ago•0 comments

Compiling Zig to RISC-V

https://www.erikkaum.com/blog/advent-05/index.html
1•tosh•13m ago•0 comments

Counterfeit G.Skill and V-Color DDR5 modules hit Chinese marketplaces

https://www.tomshardware.com/pc-components/dram/counterfeit-g-skill-and-v-color-ddr5-modules-hit-...
1•speckx•14m ago•0 comments

The Public Should Own Half of the Big A.I. Companies

https://www.sanders.senate.gov/op-eds/the-public-should-own-half-of-the-big-a-i-companies/
5•droidjj•14m ago•0 comments

If AI Data Centers Are So Great, Why Are They Being Built in Secret?

https://www.thebrockovichreport.com/p/if-data-centers-are-so-great-why
2•thisislife2•16m ago•0 comments

Overwhelmed by AI Cost Management? The Tokenomics Foundation Can Help

https://techstrong.ai/articles/overwhelmed-by-ai-cost-management-the-tokenomics-foundation-can-help/
1•CrankyBear•17m ago•0 comments

An Audience of One

https://generativead.bearblog.dev
1•GlowingFern•17m ago•0 comments

Marcia Lucas, Oscar-Winning Editor Behind 'Star Wars,' Dies at 80

https://www.hollywoodreporter.com/movies/movie-news/marcia-lucas-dead-star-wars-george-lucas-1236...
3•bookofjoe•17m ago•2 comments

Google AI Edge Eloquent

https://ai.google.dev/edge/eloquent
1•xyzzy_plugh•20m ago•1 comments

Update on supply chain compromise of Red Hat cloud-services NPM packages

https://access.redhat.com/security/vulnerabilities/RHSB-2026-006
1•dralley•21m ago•0 comments

Vintage "Greetings From " postcards production design notes

https://bethmathews.substack.com/p/the-found-production-design-notes
1•thebent•21m ago•0 comments

Angular v22

https://blog.angular.dev/announcing-angular-v22-c52bb83a4664
2•Klaster_1•21m ago•1 comments

The War on Waymo

https://www.profgmedia.com/p/the-war-on-waymo
2•JumpCrisscross•21m ago•0 comments

Strengthening Europe's Tech Sovereignty

https://digital-strategy.ec.europa.eu/en/policies/eu-tech-sovereignty
2•robalni•23m ago•0 comments

Dismay as Trump officials to dismantle key ocean monitoring system

https://www.theguardian.com/environment/2026/jun/02/trump-administration-ocean-observatories-init...
7•ndsipa_pomu•26m ago•0 comments