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

Time for a re-think of long-term antidepressant use

https://adelaide.edu.au/about/news/2026/time-for-a-re-think-of-long-term-antidepressant-use/
1•XzetaU8•1m ago•0 comments

Popular Weight-Loss Drug Found to Slow Biological Aging in Landmark Human Trial

https://scitechdaily.com/popular-weight-loss-drug-found-to-slow-biological-aging-in-landmark-huma...
1•SubiculumCode•2m ago•0 comments

'An equal and habitable world is possible' Vision for planetary survival

https://www.theguardian.com/environment/2026/jun/04/world-inequality-lab-equality-academics-plane...
1•defrost•3m ago•1 comments

Law professors prefer AI over peer answers 75% of the time [pdf]

https://law.stanford.edu/wp-content/uploads/2026/06/salinas_et_al.pdf
1•jlaneve•4m ago•0 comments

Typeface Specimens of Houston Mono

https://arslan.io/2026/05/31/typeface-specimens-of-houston-monotm/
1•wapasta•12m ago•0 comments

Is Respectful Feedback Dead?

2•likelybyte•14m ago•1 comments

Floating Point: The Origin Story

https://thechipletter.substack.com/p/floating-point-the-origin-story
1•klelatti•15m ago•0 comments

Opting Out of the AI Boom

https://www.bloomberg.com/opinion/newsletters/2026-06-03/opting-out-of-the-ai-boom
2•m-hodges•15m ago•0 comments

Optimistic Provide: How We Made IPFS Content Publishing 10x Faster

https://probelab.io/blog/optimistic-provide/
1•dennis-tra•17m ago•0 comments

Embodied Cognition and Agentic AI

https://lemire.me/blog/2026/05/28/embodied-cognition-and-agentic-ai/
1•signa11•19m ago•0 comments

Mixfont: State-of-the-art Font Generation AI Model

https://www.npmjs.com/package/mixfont
2•polaroid•19m ago•0 comments

Free Birth Chart, Today's Sky and Synastry Calculator – AstrologyWiki

https://www.astrologywiki.com/
1•Hardd•19m ago•0 comments

Telus Digital Breach Exposes Data

https://www.techradar.com/pro/security/telus-digital-confirms-breach-hackers-allegedly-stole-almo...
2•redmug•20m ago•0 comments

My Software North Star

https://kristoff.it/blog/north-star/
1•signa11•20m ago•0 comments

Privacy Is Not Dead: Beware the All-or-Nothing Mindset

https://www.privacyguides.org/articles/2025/02/17/privacy-is-not-dead/
3•Cider9986•22m ago•0 comments

The community-first software era

https://werd.io/the-community-first-software-era/
1•benwerd•26m ago•0 comments

A discovery about GCC's unidirectional rotation algorithm

https://devblogs.microsoft.com/oldnewthing/20260603-00/?p=112378
1•soheilpro•27m ago•0 comments

Trustcraft: How we build AI products at Vanta

https://www.vanta.com/resources/how-we-build-ai-products-at-vanta
1•hamelj•28m ago•0 comments

DeepSWE Audit: DeepSeek-v4-pro results are unreliable

https://github.com/datacurve-ai/deep-swe/issues/21
1•eunos•32m ago•0 comments

Can two hours of strength training a week reduce the risk of dying early?

https://www.bbc.co.uk/news/articles/c0r2lekenlpo
1•c-oreills•32m ago•1 comments

The Expansion-Compression Loop: AI-Mediated Cognitive Decoupling

https://philpapers.org/rec/HANTEL-2
1•hanhuiwen•35m ago•0 comments

Shift work and booking maintenance on the calendar

https://rachelbythebay.com/w/2026/06/03/maint/
2•zdw•36m ago•0 comments

HORG: What Are Occlupanids?

https://www.horg.com/horg/?page_id=2
2•mghackerlady•36m ago•0 comments

Your AI Text is not Mine

https://arxiv.org/abs/2606.04906
2•berlianta•40m ago•0 comments

Phylax prevent AI agents from reading or deleting your files

https://phylaxx.pages.dev/
1•usertheinfo•40m ago•1 comments

Show HN: Wd-41, hot-reload webserver for static sites

https://github.com/baalimago/wd-41
1•baalimago•42m ago•0 comments

Arithmetic Pedagogy for Language Models

https://arxiv.org/abs/2606.05106
1•berlianta•43m ago•0 comments

Wordplay: Accessible, Multilingual, Programmable Typography

https://wordplay.dev/
1•azhenley•43m ago•0 comments

The DX3270 Terminal Emulator for Mac Now Serves TN5250 as Well

https://dn3270.com/
1•el_dockerr•49m ago•0 comments

2025 Social Security Trustees Report [pdf]

https://www.ssa.gov/OACT/TR/2025/tr2025.pdf
3•latentframe•53m ago•0 comments