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

AI Models Are Great at Finding Security Bugs. Can They Tell When They're Fixed?

https://medium.com/meetcyber/ai-models-are-great-at-finding-security-bugs-but-can-they-tell-when-...
1•ls1911•3m ago•0 comments

BillFlowr: Simple invoicing and payment tracking for freelancers, small agencies

https://www.billflowr.com
1•jimmy_lee•3m ago•0 comments

Uswds is dead. Long live USWDS

https://matthenry.fyi/posts/long-live-uswds/
2•cdrnsf•4m ago•0 comments

Prediction of Future Strategic Issues/Future Warfare for 2025 (2001)[pdf]

https://archive.org/details/future-strategic-issues-and-warfare_202011
1•smalltorch•4m ago•1 comments

Show HN: Harness.apk – a drop-in on-device agent for Android

https://github.com/nev3rfail/harness.apk
1•nev3rfail•4m ago•0 comments

Federal judge orders Texas to air condition all prisons by the end of 2029

https://www.texastribune.org/2026/09/22/texas-prison-air-conditioning-lawsuit-ruling/
2•bonefishgrill•5m ago•0 comments

Welcoming Jürgen Schmidhuber to Sakana AI

https://sakana.ai/schmidhuber/
3•hardmaru•5m ago•0 comments

DentaQuest sued for allegedly exposing 15M patients' private information

https://topclassactions.com/lawsuit-settlements/lawsuit-news/dentaquest-sued-for-allegedly-exposi...
1•sans_souse•6m ago•1 comments

Show HN: Cancel Death – What changed in longevity science

https://canceldeath.com
1•kiddz•7m ago•0 comments

Night Shifts: Can technology shape our dreams?

1•momentmaker•8m ago•1 comments

AI doomers may be wrong but the skeptics seem even wronger

https://mathewingramblog.wordpress.com/2026/09/24/ai-doomers-may-be-wrong-but-the-skeptics-seem-e...
2•speckx•8m ago•0 comments

Show HN: Vigil Icons – 111 free icons for what people accuse each other of

https://www.vigilicons.com/
2•vigilantk•9m ago•0 comments

Give every take a kill date

https://firstlastword.substack.com/p/give-every-take-a-kill-date
2•grrrtttt•9m ago•0 comments

A searchable library of forgotten public-domain film clips from 1915 onward

https://www.movingimagearchive.com/
1•momentmaker•9m ago•0 comments

Play is doing its work even if we're not keeping score

https://aeon.co/essays/play-is-doing-its-work-even-if-were-not-keeping-score
2•momentmaker•10m ago•0 comments

NASA's New $4B Space Telescope Just Saw Starlight for the First Time

https://gizmodo.com/nasas-new-4-billion-space-telescope-just-saw-starlight-for-the-first-time-her...
1•gmays•11m ago•0 comments

What Happens When the Model Eats the Stack?

http://muratbuffalo.blogspot.com/2026/09/what-happens-when-model-eats-stack.html
4•mark4•12m ago•0 comments

EU Tech Push Boosts Ultrafast Laser Startups

https://spectrum.ieee.org/ultrafast-lasers-europe
1•maxall4•12m ago•0 comments

Wiring memory into an agent costs tokens every turn. This one earned it back

https://vshulcz.github.io/deja-vu/guide/day-zero.html
1•vshulcz•12m ago•0 comments

Europe Must Choose Between Power and Dependence

https://slavoj.substack.com/p/europe-must-choose
1•vincvinc•14m ago•0 comments

Mathematics in the Age of AI Oracles [pdf]

https://colala.berkeley.edu/papers/piantadosi2026mathematics.pdf
2•pharmacy7766•14m ago•0 comments

CVE-2026-91766: PHP had the redirect credential leak curl fixed in 2018

https://daubois.dev/blog/cve-2026-91766-php-http-redirect-credential-leak/
2•amvalex•16m ago•1 comments

LinkedIn wins court order blocking mass scraping of user data

https://therecord.media/linkedin-wins-court-order-blocking-mass-scraping
3•ilamont•18m ago•0 comments

Megafauna Extinction and Startups

https://johnjwang.com/post/2026/09/23/megafauna-extinction-and-startups
2•johnjwang•19m ago•0 comments

Discovering and exploiting a remote code execution vulnerability in OpenCode

https://securitylabs.datadoghq.com/articles/opencode-upgrade-remote-code-execution/
2•meetpateltech•21m ago•0 comments

Chicago No. 1

https://dynamicallytyped.org/typewriters/176
3•Bluestein•22m ago•0 comments

Oracle invokes force majeure on New Mexico AI data center

https://qz.com/oracle-force-majeure-new-mexico-ai-data-center-092426
3•dgellow•22m ago•0 comments

Making the case for Ed Zitron as the last of the great bloggers

http://observationalepidemiology.blogspot.com/2026/09/i-think-you-can-make-case-that-ed.html
3•bediger4000•23m ago•0 comments

I Have a Confession: I Built This Site with AI – Please Forgive Me

https://dynamicallytyped.org/blog/i-have-a-confession-i-built-this-site-with-ai
3•joelberger•26m ago•0 comments

Show HN: Timebar, a Mac timer shown as a thin line below the menu bar

https://github.com/velvet-shark/timebar
1•sabon•27m ago•1 comments