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

Musk says SpaceX restricted Ukraine's Starlink connection as service restored

https://www.bbc.co.uk/news/articles/cvx28ljp8n4xo
1•iamflimflam1•44s ago•0 comments

Difftastic, a Structural Diff

https://difftastic.wilfred.me.uk/
1•Tomte•1m ago•0 comments

France asked ISPs to prepare temporary DNS blocks for major social platforms

https://www.blast-info.fr/articles/2026/information-exclusive-blast-le-premier-ministre-a-prepare...
2•noplay•6m ago•0 comments

Econvitals

https://econvitals.org/
1•Ihmahr•8m ago•0 comments

Ask HN: Are tab completion models dead?

2•sandruso•10m ago•0 comments

Nikon photography contest winner loses title after scientists spot signs of AI

https://www.techspot.com/news/114171-nikon-photography-contest-winner-loses-title-after-scientist...
2•thunderbong•11m ago•0 comments

Active Sonar: Mitigating Hardware CV Aimbots via Kinematics [RFC]

https://github.com/LeoLordin/Active-Sonar-AntiCheat
2•LeoLordin•11m ago•0 comments

Brutalist Architecture

https://en.wikipedia.org/wiki/Brutalist_architecture
1•tosh•11m ago•0 comments

An artist's take on AI in math

https://3blue1brown.substack.com/p/an-artists-take-on-ai-in-math
2•Eridanus2•12m ago•0 comments

The AI and Steve Strogatz

https://cultureandcompass.substack.com/p/the-ai-and-steve-strogatz
2•artninja1988•14m ago•0 comments

Decompiling Fast Food Tycoon 2: Drawing the World

https://healeycodes.com/decompiling-fast-food-tycoon-2-drawing-the-world
1•ingve•22m ago•0 comments

Dump Shock

https://wiki.c2.com/?DumpShock
2•ColinWright•24m ago•0 comments

Show HN: OpenXet

https://github.com/stubbi/openxet
2•stubbi•33m ago•0 comments

Allocating Off-Heap Memory: Typically 6-18x Faster in JDK 28

https://inside.java/2026/10/23/confined-pools/
3•karussell•33m ago•0 comments

Emacs Folds to My Liking

https://jointhefreeworld.org/blog/articles/emacs/emacs-folding-kirigami/
1•signa11•41m ago•0 comments

Chinese EVs found back door into Western car markets – at 40% off MSRP

https://electrek.co/2026/10/24/chinese-evs-found-back-door-into-western-car-markets-at-40-off-msrp/
1•cisc•43m ago•0 comments

Bill Gates warns the 'evolutionary' age of AI will be brutal for workers

https://observer.co.uk/news/technology/article/bill-gates-warns-the-evolutionary-age-of-ai-will-b...
2•iamflimflam1•43m ago•0 comments

Show HN: Online Ruler, a Free Ruler for Your Screen

https://onlineruler.in
1•secondorder•44m ago•0 comments

Anthropic Sued for Using Elvis Presley Music to Train AI Models

https://www.hollywoodreporter.com/music/music-industry-news/anthropic-elvis-presley-lawsuit-ai-12...
3•ersinesen•46m ago•0 comments

Keploy – an open-source API and integration testing tool

https://github.com/keploy/keploy
1•javatuts•50m ago•0 comments

You Quit What Drained You. Why Do You Feel Worse?

https://julienreszka.com/blog/you-quit-what-drained-you-why-do-you-feel-worse/
2•julienreszka•51m ago•0 comments

BoardLoupe: Web Boardview Viewer

https://hands-on-security.github.io/BoardLoupe/
1•notmine1337•57m ago•0 comments

Jevons Paradox

https://en.wikipedia.org/wiki/Jevons_paradox
1•TechTechTech•57m ago•1 comments

Heartbreak, hope and human imperfection: Leonard Cohen's greatest songs

https://www.theguardian.com/music/2026/oct/22/leonard-cohen-best-songs-ranked
1•Tomte•58m ago•0 comments

Online censorship is crushing indie webcomics

https://xtramagazine.com/culture/online-censorship-indie-webcomics-284463
35•Tomte•58m ago•12 comments

Show HN: ToolsOfWeb – 69 free online tools that run in the browser

https://www.toolsofweb.com/
1•toolsofweb•1h ago•0 comments

Meta Ignores Brazilian Court Order to End Bolsonaro Favoritism

https://www.panamericandispatch.org/p/meta-ignores-brazilian-court-order
95•vrganj•1h ago•31 comments

Apple Wants to Fix Safari's Cramped Layout on iPhone Duo

https://www.macrumors.com/2026/10/25/apple-wants-to-fix-safari-on-iphone-duo/
2•tosh•1h ago•0 comments

Automatic Content Recognition

https://en.wikipedia.org/wiki/Automatic_content_recognition
1•tosh•1h ago•0 comments

ElectIt: U.S. Elections Forecast

https://gking.harvard.edu/electit/#ours_race_rcp_pace-history_err-hist_rp-expected
1•alexander2002•1h ago•0 comments