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

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•7mo ago
Agreed

Miss

1•Alicia-Garcia•3m ago•0 comments

Countries with the Most Spoken Languages

https://www.visualcapitalist.com/ranked-the-10-countries-with-the-most-spoken-languages/
1•gsf_emergency_6•4m ago•0 comments

15Minutes – I watched an Hormozi reel and built a time-tracking app

https://apps.apple.com/us/app/15-minutes-timer-tracker/id6755746138
1•rohidjetha•4m ago•1 comments

China to regulate CEO romance micro dramas, warns against promoting materialism

https://www.globaltimes.cn/page/202411/1323805.shtml
1•walterbell•5m ago•0 comments

Traits of a Good Tech Lead

https://world.hey.com/joaoqalves/traits-of-a-good-tech-lead-b5cac0ae
2•kiyanwang•9m ago•0 comments

Shallow trees with heavy leaves (2020)

https://cp4space.hatsya.com/2020/12/13/shallow-trees-with-heavy-leaves/
2•HeliumHydride•10m ago•0 comments

Show HN: Xhancer – Enhance Your /Twitter Experience

https://xhancer.com/
1•luokuo•12m ago•0 comments

Risk of acute kidney injury and mortality in patients vaccinated for Covid-19

https://www.medsci.org/v22p4483.htm
2•walterbell•16m ago•0 comments

Tech Labs request-for-info: NSF funding for research orgs outside academia

https://sam.gov/workspace/contract/opp/7332ade93217443ba8c9abb916904e03/view
1•gsf_emergency_6•18m ago•0 comments

English vocabulary test – how many words do you know?

https://www.myvocab.info/en
1•danousna•20m ago•0 comments

Show HN: luainstaller – Package your Lua scripts into binaries

https://github.com/Water-Run/luainstaller
1•WaterRun•21m ago•0 comments

Dominatrix turns tech founder to combat revenge porn

https://www.bbc.com/news/articles/c98n6yr3eg8o
1•defrost•32m ago•0 comments

Jubilant: Python Subprocess and Go Codegen

https://benhoyt.com/writings/jubilant/
1•benhoyt•38m ago•0 comments

UK Influencer Livestreams Encounter with Ringo Starr, Whom He Doesn't Recognize

https://stereogum.com/2482933/uk-influencer-ed-matthews-livestreams-encounter-with-ringo-starr-wh...
2•thomassmith65•40m ago•0 comments

Fuzix on a Raspberry Pi Pico

https://ewpratten.com/blog/fuzix-pi-pico
1•ewpratten•45m ago•0 comments

From trees to graphs: speeding up vector search 10x with Hannoy

https://blog.kerollmops.com/from-trees-to-graphs-speeding-up-vector-search-10x-with-hannoy
2•uonr•54m ago•1 comments

Any reliable free AI business plan generators?

1•selmas58•55m ago•0 comments

Show HN: Warper – The fastest React virtualization library, built with Rust/WASM

https://warper.tech/
2•itsmeadarsh•58m ago•0 comments

Realtime Rendering of Caustics

https://www.youtube.com/watch?v=cD_jnCAqxWk
1•E-Reverance•1h ago•0 comments

Hacker News Popup – Chrome Web Store

https://chromewebstore.google.com/detail/hacker-news-popup/decfpoogjcefcgolalhpigfcofidngjk
1•mnunkowme•1h ago•0 comments

Group Chats in ChatGPT – OpenAI Help

https://help.openai.com/en/articles/12703475-group-chats-in-chatgpt
1•nalinidash•1h ago•0 comments

Why proteins fold and how GPUs help us fold

https://aval.bearblog.dev/nvidiaproteins/
15•diginova•1h ago•1 comments

Distilling persona vectors into LLM weights

https://martianlantern.github.io/2025/12/persona-vector-distillation/
1•martianlantern•1h ago•0 comments

Rob Reiner, Legendary Comedic Actor and Director, Found Dead in His Home

https://variety.com/2025/film/news/rob-reiner-dead-princess-bride-spinal-tap-1236608541/
3•boarsofcanada•1h ago•2 comments

Speed matters: Why working quickly is more important than it seems

https://jsomers.net/blog/speed-matters
2•bschne•1h ago•1 comments

The Republic of Rose Island

https://en.wikipedia.org/wiki/Republic_of_Rose_Island
2•devrob•1h ago•0 comments

We learned that fewer news stories get listened to more

https://tera.fm
2•digi_wares•1h ago•1 comments

Building AI-Powered Image Generation with OpenAI-Compatible Responses API

https://vllora.dev/blog/building-ai-powered-image-gen-responses-api/
1•karolisgud•1h ago•0 comments

Common Rust Lifetime Misconceptions

https://github.com/pretzelhammer/rust-blog/blob/master/posts/common-rust-lifetime-misconceptions.md
2•CafeRacer•1h ago•0 comments

Nvidia-backed Starcloud trains first AI model in space, orbital data centers

https://www.cnbc.com/2025/12/10/nvidia-backed-starcloud-trains-first-ai-model-in-space-orbital-da...
10•walterbell•1h ago•5 comments