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

Soaring stocks created 2M new millionaires around the world last year

https://www.cnbc.com/2026/06/04/stocks-new-millionaires.html
1•ajay-d•28s ago•0 comments

Show HN: FirstDraft – AI workers that claim Jira tickets and open PRs

https://firstdraft.run
1•gamerdrome•48s ago•0 comments

Exploring Ruby Algorithms for Fibonacci Numbers

https://www.rorvswild.com/blog/2025/fibonacci-ruby-algorithms
1•thunderbong•2m ago•0 comments

Tell HN: Our knowledge never was the limit

1•franze•2m ago•0 comments

SpaceX investor roadshow presentation [pdf]

https://content.spacex.com/cms-assets/assets/SpaceX%20IPO%20Roadshow.pdf
1•frasermarlow•4m ago•1 comments

Show HN: Revaiso – AI writing in Google Docs as native suggestions

https://chromewebstore.google.com/detail/revaiso/pgadnhlihdcmplleikbcmippnmfpfbin
1•roykishony•6m ago•0 comments

End of CHU: Canada's Official Shortwave Time Signal Goes Silent in 2026

https://radio-hobbyist.com/canada-chu-time-signal-shutdown-2026/
3•7402•7m ago•0 comments

Palantir to manage UK firearms, explosives, and poisons licensing

https://www.theregister.com/databases/2026/06/04/palantir-wins-9m-contract-to-run-uk-firearms-lic...
2•logickkk1•10m ago•0 comments

Porting Wasmer Django backend to Rust improved the infra usage by 90%

https://wasmer.io/posts/ported-wasmer-backend-django-to-rust
1•syrusakbary•10m ago•0 comments

Bel spec guide interleaved with its source code

https://github.com/pmc99/pmc99.github.io
1•pmc99•14m ago•0 comments

Why Gamers Are Drawn to High-Risk, High-Reward Mechanics

https://nichegamer.com/why-gamers-are-drawn-to-high-risk-high-reward-mechanics/
1•HelloUsername•14m ago•0 comments

Cloud-optimizing the GOES-16 satellite data archive without copying data

https://www.earthmover.io/blog/virtual-zarr/
7•tomnicholas1•15m ago•1 comments

The Effective Sample Size

https://alex.smola.org/posts/40-effective-sample-size/
1•jxmorris12•18m ago•0 comments

Can Postgres Queues Scale?

https://www.dbos.dev/blog/making-postgres-queues-scale
2•KraftyOne•18m ago•1 comments

Nintendo announces new Switch 2 model with removable battery In the EU

https://www.nintendo.com/en-gb/Corporate/Consumer-Information/Compliance-with-EU-Directives-and-R...
3•HelloUsername•19m ago•0 comments

See, Act, Correct: three levers for working with a code agent

https://blog.owulveryck.info/2026/06/04/see-act-correct-three-levers-for-working-with-a-code-agen...
1•owulveryck•19m ago•0 comments

Show HN: Vlags, small vector flags. Less than 900 bytes each

https://vlags.com/
1•ryancanzo•20m ago•0 comments

Opensessions – A beautiful TMUX sidebar, no nonsense

https://github.com/Ataraxy-Labs/opensessions
1•rohanucla•20m ago•0 comments

Show HN: Apple's Unreleased Persona Body Animation Solver, Running on a Mac

https://gitlab.com/niallhorn/persona-coreik-simulatordemo
1•iheartbiggpus•21m ago•1 comments

Hays Code

https://en.wikipedia.org/wiki/Hays_Code
2•fidotron•22m ago•0 comments

Information Overload

https://disconnect.blog/information-overload/
2•cdrnsf•23m ago•1 comments

Immigrant Rights Lawyers File Lawsuit over Palantir's Elite

https://www.404media.co/immigrant-rights-lawyers-file-lawsuit-over-palantirs-elite/
1•cdrnsf•23m ago•0 comments

Multigres v0.1 Alpha: an operating system for Postgres

https://supabase.com/blog/multigres-v0-1-alpha
5•alex-reyss•26m ago•0 comments

A Desperate Plea for a Free Software Alternative to Aspera (2018)

https://www.ccdatalab.org/blog/a-desperate-plea-for-a-free-software-alternative-to-aspera
2•downbad_•27m ago•0 comments

BrickThink Launches to the Masses

https://www.brickthink.io/
1•workpage•28m ago•0 comments

'Touchy-feely' dark matter is having a moment

https://www.scientificamerican.com/article/touchy-feely-dark-matter-is-having-a-moment/
1•speckx•30m ago•0 comments

Review HN

https://reviewreply.pages.dev
1•Contentbase•30m ago•1 comments

Ladybird browser update (May 2026)

https://www.youtube.com/watch?v=GZoLy5e8y-4
4•poly2it•30m ago•0 comments

Some spinosaurs cried salty tears to thrive in brackish waters

https://www.science.org/content/article/some-spinosaurs-cried-salty-tears-thrive-brackish-waters
1•gmays•31m ago•0 comments

Mars Doesn't Need a Magnetic Field

https://pioneerlabs.substack.com/p/no-mars-doesnt-need-a-magnetic-field
1•grantbel•32m ago•1 comments