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•6mo 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•6mo 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•6mo 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•6mo 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•6mo ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•6mo ago
Agreed

Chinese parts supplier takes stake in leading Russian drone maker

https://www.ft.com/content/e907c2fa-2d3b-4269-bc6c-b2fee4d9f688
1•petethomas•1m ago•0 comments

Insecure Data Storage in IoT Smart Lock App

https://blog.ptidej.net/understanding-insecure-data-storage-in-iot-smart-lock-companion-app/
1•yann-gael•6m ago•1 comments

Chainguard: 1,800 trusted container images to eliminate your vulnerabilities

https://www.chainguard.dev
1•doener•6m ago•0 comments

Big tech is creating its own media bubble to 'win the narrative battle online'

https://www.theguardian.com/technology/2025/nov/29/big-tech-silicon-valley-ceo-media
2•1659447091•9m ago•0 comments

Dilution vs. Risk taking: Capital gains taxes and entrepreneurs

https://www.nber.org/papers/w34512
7•hhs•10m ago•0 comments

Harmonic's automated theorem prover Aristotle solves open Erdős problem in Lean

https://www.erdosproblems.com/forum/thread/124#post-1892
6•mathfan•11m ago•0 comments

White House launches website to excoriate media for 'biased' stories

https://www.theguardian.com/us-news/2025/nov/29/white-house-media-website-trump
1•1659447091•13m ago•0 comments

The long wait is over, Ganymede has arrived

https://endeavouros.com/news/the-long-wait-is-over-ganymede-has-arrived/
1•doener•13m ago•0 comments

Nlmixr2, an R-based OSS challenger to NONMEM/Monolix/Phoenix, joins R Consortium

https://r-consortium.org/posts/nlmixr2-is-becoming-an-r-consortium-working-group/
1•ionychal•17m ago•0 comments

Scala

https://www.huygens-fokker.org/scala/
2•onestay42•19m ago•0 comments

Leonardo shows Michelangelo, an AI missile shield for Europe

https://ukdefencejournal.org.uk/leonardo-shows-michelangelo-an-ai-missile-shield-for-europe/
1•jshprentz•19m ago•0 comments

Why do most new languages fail? (2012)

https://pointersgonewild.com/2012/06/07/why-do-most-new-languages-fail/
1•azhenley•19m ago•0 comments

Indonesia resists US trade deal 'poison pill'

https://www.ft.com/content/64d27052-a434-4e81-9321-87216eecf99c
3•hhs•20m ago•0 comments

Goodbye, Price Tags. Hello, Dynamic Pricing

https://www.nytimes.com/2025/11/28/opinion/dynamic-pricing-algorithms.html
4•apparent•22m ago•1 comments

Show HN: I Wrote a Field Manual on Self-Hosting(Immich,ZFS,Docker)Free on Kindle

https://www.amazon.com/dp/B0FY3XXPNV
2•devmicrosystems•34m ago•0 comments

Make It Easy for Humans

https://tombedor.dev/make-it-easy-for-humans/
1•jjfoooo4•35m ago•0 comments

Gemini Apps limits and upgrades for Google AI subscribers

https://support.google.com/gemini/answer/16275805?hl=en
1•doener•35m ago•0 comments

Compiler Explorer now supports Racket

https://godbolt.org/z/z3WffbzaY
1•azhenley•37m ago•0 comments

It's mathematically highly likely that there is life elsewhere in the universe

https://www.sciencedirect.com/science/article/pii/S0094576525006599?via%3Dihub
4•Rogach•39m ago•4 comments

Token Visualizer

https://github.com/PeterHdd/token-visualization
1•peterhddcoding•39m ago•1 comments

Zenroom – No-code cryptographic virtual machine

https://zenroom.org/
1•smartmic•48m ago•1 comments

94% zero-shot in a shifting gridworld, no retraining

1•heavymemory•57m ago•0 comments

Mint Is Not TeX

https://mint.ubavic.rs/
3•ubavic•58m ago•2 comments

The Fastest Image Diffing Engine You've Never Heard Of

https://vizzly.dev/blog/honeydiff-vs-odiff-pixelmatch-benchmarks/
3•Robdel12•1h ago•0 comments

Eraser: A Dynamic Data Race Detector for Multithreaded Programs (1997) [pdf]

https://web.stanford.edu/class/archive/cs/cs240/cs240.1054/readings/Tocs97.pdf
1•todsacerdoti•1h ago•0 comments

He Wants a New Start. So He Is Taking the Hardest Driving Test in the World

https://www.nytimes.com/2025/11/24/world/europe/london-black-cab-taxi-driving-test.html
1•bookofjoe•1h ago•1 comments

Get Your Kid a Watch

https://www.theatlantic.com/technology/2025/11/smartwatch-kids-screen-time/684975/
5•fortran77•1h ago•1 comments

Pinball Shopify

https://bfcm.shopify.com/
3•SnaKeZ•1h ago•0 comments

Americans no longer see four-year college degrees as worth the cost

https://www.nbcnews.com/politics/politics-news/poll-dramatic-shift-americans-no-longer-see-four-y...
43•jnord•1h ago•32 comments

Memory-Graph – Knowledge Graph Memory for Claude Code with SQLite/Neo4j/Memgraph

https://github.com/gregorydickson/memory-graph
2•gregorydickson•1h ago•1 comments