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

Show HN: 18 y/o – built the world's first behavioural intelligence platform

https://www.assemblr.net/
1•adityahv•1m ago•0 comments

Ask HN: Why didn't the C64 come with Simon's BASIC in the box from 1983 onwards?

1•amichail•1m ago•0 comments

Why Physical Reality Is a Collective Construction

https://mimetra.com/blog/consciousness-fusion/
2•mw67•2m ago•0 comments

I am not a black belt

https://rodolphoarruda.pro.br/i-am-not-a-black-belt/
1•rodolphoarruda•4m ago•0 comments

The Leader of NASA's Artemis II Mission Is Still Moonstruck

https://www.newyorker.com/news/the-new-yorker-interview/the-leader-of-nasas-artemis-ii-mission-is...
1•fortran77•4m ago•0 comments

Show HN: Worldnotes – infinite notes in-browser canvas

https://github.com/AlexMason/worldnotes
1•recursivegirth•6m ago•0 comments

Machine: Never run NPM install on your computer

https://runmachine.dev/
1•katspaugh•7m ago•0 comments

Object-Store Native Databases

https://www.opendata.dev/docs
1•alex_hirner•8m ago•0 comments

The Next Computer Is Alive

https://www.reloadnyc.com/the-ai-shuffle/
1•smesser•10m ago•0 comments

Show HN: Brew-browser – A native macOS GUI for Homebrew

https://github.com/msitarzewski/brew-browser
1•msitarzewski•11m ago•0 comments

Did Amphetamines Help Erdős?

https://aleph.se/andart2/math/did-amphetamines-help-erdos/
1•wslh•12m ago•0 comments

The AI Bifurcation of Tech: Why the fundamentals matter more

https://neevash.com/blog/tech-bifurcation-and-the-0.5-layer
1•Nash0x7e2•13m ago•0 comments

A History of Obituaries in American Newspapers

https://blogs.loc.gov/headlinesandheroes/2026/05/mourn-not-a-history-of-obituaries-in-american-ne...
1•NaOH•14m ago•0 comments

Decree 770

https://en.wikipedia.org/wiki/Decree_770
1•mmh0000•14m ago•0 comments

Study of AI use by undergrads revealing disparities in access – and in cheating

https://news.berkeley.edu/2026/05/21/the-largest-study-of-ai-use-by-undergrads-is-in-revealing-di...
1•ChrisArchitect•14m ago•1 comments

When Generation Becomes Cheap, Selection Becomes Governance

https://lospino.so/blog/sunday-field-notes/the-workshop-has-changed/
1•jalospinoso•16m ago•0 comments

DHS says ICE has 'no relationship' with spyware maker Paragon Solutions

https://www.npr.org/2026/05/22/nx-s1-5831577/dhs-ice-spyware-paragon
3•devonnull•17m ago•0 comments

San Francisco Buried Treasure Has Been Found. Stop Hunting

https://www.buriedtreasuresf.com/solution
2•ChrisArchitect•18m ago•1 comments

Designing Event-Driven EVM Monitoring Systems

https://blog.bridgexapi.io/designing-event-driven-evm-monitoring-systems
1•Bridgexapi•20m ago•0 comments

CBP Directive 3340-049B: Border Search of Electronic Devices

https://www.cbp.gov/document/directives/cbp-directive-no-3340-049b-border-search-electronic-devices
1•Ember_Wipe•23m ago•0 comments

AV2 Codec Looks Like It Will Be Officially Released Next Week

https://www.phoronix.com/news/AV2-Next-Week
1•WithinReason•24m ago•0 comments

What Happens When Someone You Love Changes Their Face?

https://www.bloomberg.com/news/articles/2026-05-22/plastic-surgery-and-glp-1s-are-inspiring-a-new...
1•thunderbong•24m ago•0 comments

BYU's Supermileage vehicle: Squeezing 2,145 miles out of a single gallon of fuel

https://news.byu.edu/intellect/the-best
2•_josh_meyer_•25m ago•1 comments

A Fundamental Principle of Aeronautical Engineering Has Been Overturned

https://www.wired.com/story/a-fundamental-principle-of-aeronautical-engineering-has-been-overturned/
1•littlexsparkee•25m ago•2 comments

LLM Edit Tool – Failure Modes and Proposed Improvements

https://github.com/professor-jonny/pulsar-edit-mcp-server/blob/main/LLM-FAILURE-MODES.md
1•professor_jonny•27m ago•1 comments

We built OpenLinker, an open-source channel manager

https://openlinker.io/en/blog/why-we-built-openlinker/
1•PeterSwierzy•27m ago•0 comments

Libexpat Is Understaffed

https://github.com/libexpat/libexpat/blob/master/expat/Changes
1•wg0•28m ago•0 comments

List of April Fools RFCs

https://gist.github.com/eliminmax/7e70b89ae9a996aec7bbb32229def45b
2•NicoHartmann•29m ago•0 comments

New Zealand at wild frontier of AI superhacking

https://www.rnz.co.nz/news/science-and-technology/596203/nz-at-wild-frontier-of-ai-superhacking
6•billybuckwheat•30m ago•1 comments

The Race Is on (AI)

https://www.reloadnyc.com/the-race-is-on/
1•smesser•31m ago•0 comments