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

Could Anthropic have solved Navier–Stokes?

https://twitter.com/ElliotGlazer/status/2096076054133952516
1•marcelo-earth•1m ago•0 comments

An OS with two syscalls that runs COBOL on bare metal, no LLVM or GCC

https://github.com/AndreeSalazar/BMO-X
1•Salazar-X•5m ago•0 comments

Is AI ruining my brain?

https://thoughtbot.com/blog/is-ai-ruining-my-brain
1•signa11•5m ago•0 comments

Booz Allen Cyber Weapon Index

https://www.boozallen.com/insights/cyber/cyber-weapon-index.html
2•jonbaer•6m ago•0 comments

Why are European countries moving their gold out of North America?

https://www.bbc.com/news/articles/cvgyn8q8gqxo
5•ranit•6m ago•0 comments

LG and Samsung TVs are logging everything you say [video]

https://www.youtube.com/watch?v=w5KnFmKjFTA
2•someonebaggy•13m ago•0 comments

Cerebras CS-4: 30x Faster Than GPUs

https://www.cerebras.ai/blog/introducing-cerebras-cs-4
2•mgh2•14m ago•1 comments

Claude Fable 5.1 and Mythos 5.1: The System Card

https://thezvi.substack.com/p/claude-fable-51-and-mythos-51-the
1•paulpauper•18m ago•0 comments

Liechtenstein prince tightens grip in succession shake-up

https://www.ft.com/content/c25c1bdf-8acf-4ccc-bc67-c31bc9fb83bc
1•paulpauper•18m ago•0 comments

New Zealand is determined not to keep China's espionage a secret

https://www.lowyinstitute.org/the-interpreter/new-zealand-is-determined-not-to-keep-china-s-espio...
5•pir8life4me•26m ago•0 comments

Opinion: Religion Lowers Individual Morality

3•ReligionKills•27m ago•2 comments

Show HN: Mac Cleaner for devs

https://app.paymug.co/buy/lime-cleaner-mac
1•docuru•28m ago•1 comments

Show HN: PATM - A graphical database manager and developer toolbox

https://github.com/jamalhill12321-hash/patm
1•jamalhill•28m ago•1 comments

There's No Such Thing as an AI 'Lab'

https://www.theatlantic.com/technology/2026/09/stop-calling-ai-companies-labs/688528/
1•littlexsparkee•28m ago•0 comments

Cancer Capital: VC didn't use to work like this

https://www.anildash.com/2026/09/04/vc-didnt-use-to-work-like-this/
1•dotcoma•29m ago•0 comments

Murdoku – Murder mystery meets Sudoku

https://murdoku.com/play/
1•gmargari•30m ago•0 comments

GhostMeet – A Google Meet summarizer with no bot in your call

https://chromewebstore.google.com/detail/ghostmeet/figodpdocbgklmeglohdjomeikabfpeo
2•sahilpradhan•33m ago•0 comments

Route Planner for Edo Period Japan

https://maps.chizutodesign.com/edo-routing/
3•ryzvonusef•36m ago•1 comments

Cosco calls US espionage allegations 'groundless'

https://www.chinadaily.com.cn/a/202609/04/WS6a9a5c0fe4b06d4aa055c61b.html
1•pir8life4me•36m ago•1 comments

I built a multiplayer version of the 4,500-year-old Royal Game of Ur

https://royalgameofur.app
2•potentdream•36m ago•0 comments

Plane spotter or Chinese spy? Ontario university student suspected of espionage

https://www.cbc.ca/news/world/university-of-waterloo-student-arrested-michigan-9.7328984
1•pir8life4me•38m ago•1 comments

CSS is Turing Complete (2022)

https://github.com/Mooninaut/css-is-turing-complete
2•lukasgelbmann•44m ago•0 comments

Show HN: ActraDeck – Put risky coding-agent actions back in front of a human

https://github.com/actradeck/actradeck
2•TKMD•48m ago•0 comments

Reverse Engineering an ASIC

https://www.outercloud.dev/blogs/reverse-asic/
2•outercloud•49m ago•0 comments

Air India A320 pilot could have triggered hydraulic shutdown that injured 17

https://avherald.com/h?article=53cc9465
4•r2sk5t•52m ago•1 comments

Auto alliance asks for permanent ban on Chinese cars

https://thehill.com/policy/transportation/6070614-auto-companies-congress-letter-chinese-car-ban/
4•signa11•58m ago•0 comments

Once again, overcompliance affects Venezuelan users, this time Cursor

https://twitter.com/LuisAlejandro/status/2096022819024904513
3•firekvz•1h ago•1 comments

Repairing Traces on a Delidded Pentium III CPU Gone Wrong

https://hackaday.com/2026/09/04/repairing-traces-on-a-delidded-pentium-iii-cpu-gone-wrong/
2•colinprince•1h ago•0 comments

Google will limit how much memory Android apps can use from February 2027

https://thenextweb.com/news/google-android-app-memory-limits-play-store
4•doctaj•1h ago•0 comments

Caching audits: Five antipatterns that cost performance and money

https://vercel.com/kb/guide/caching-antipatterns
3•flashbrew•1h ago•0 comments