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

Breast Cancer Prediction Dashboard · Streamlit

https://breast-cancer-prediction-project-xlaymqx3l7jvnhhhsvjbh8.streamlit.app
1•yasminealiosman•3m ago•0 comments

Mesa shuts down credit card that rewarded cardholders for paying their mortgages

https://techcrunch.com/2025/12/14/mesa-shuts-down-credit-card-that-rewarded-cardholders-for-payin...
1•jnord•4m ago•0 comments

Clean, Limitless Energy Exists. China Is Going Big in the Race to Harness It

https://www.nytimes.com/2025/12/13/climate/china-us-fusion-energy.html
1•donohoe•5m ago•0 comments

Overview of the Memory Market in Mid-December 2025

https://hanchouhsu.substack.com/p/overview-of-the-memory-market-in
1•walterbell•6m ago•0 comments

Our emotional pain became a product

https://www.theguardian.com/us-news/ng-interactive/2025/dec/14/trauma-mental-health
2•worik•6m ago•0 comments

The Case Against Microservices

https://sashafoundtherootcauseagain.substack.com/p/the-case-against-microservices
2•birdculture•7m ago•0 comments

AI agents are starting to eat SaaS

https://martinalderson.com/posts/ai-agents-are-starting-to-eat-saas/
2•jnord•8m ago•0 comments

Risks for public health related to presence of furan and methylfurans in food

https://efsa.onlinelibrary.wiley.com/doi/10.2903/j.efsa.2017.5005
1•pera•11m ago•0 comments

Show HN: G023's OllamaMan – Web-based OS for managing Ollama servers

https://github.com/g023/g023-OllamaMan
1•g023•16m ago•0 comments

Scam Compounds Become Targets in Thai-Cambodian Border War

https://www.wsj.com/world/asia/scam-compounds-become-targets-in-thai-cambodian-border-war-7fbfe575
2•JumpCrisscross•19m ago•0 comments

Building a High-Performance OpenAPI Parser in Go

https://www.speakeasy.com/blog/building-speakeasy-openapi-go-library
2•indybonez•25m ago•1 comments

Rivian's Gen3 Processor [video]

https://www.youtube.com/watch?v=cu0_ZEIT5YU
1•kappi•25m ago•0 comments

Claude CLI deleted my home directory Wiped my whole Mac

https://old.reddit.com/r/ClaudeAI/comments/1pgxckk/claude_cli_deleted_my_entire_home_directory_wi...
44•tamnd•34m ago•25 comments

What a top food safety expert won't order for dinner

https://www.washingtonpost.com/business/2025/12/14/foodborne-illness-safety-expert-advice/
3•bookofjoe•38m ago•5 comments

Last Call for Mass Market Paperbacks

https://www.publishersweekly.com/pw/by-topic/industry-news/publisher-news/article/99293-last-call...
1•dsr_•40m ago•0 comments

DARPA GO: Generative Optogenetics

https://www.darpa.mil/research/programs/go
1•birriel•43m ago•0 comments

Rive in React Native – The Good, the Bad and the Janky

https://justanotherheroriding.github.io/portfolio/writing/rive-react-native
1•justAnotherHero•46m ago•1 comments

British Rail Sandwich (Wikipedia)

https://en.wikipedia.org/wiki/British_Rail_sandwich
3•valzevul•49m ago•0 comments

Ask HN: Can someone explain why Meta makes such bad design decisions?

7•Desafinado•51m ago•1 comments

The Eerie Parallels Between AI Mania and the Dot-Com Bubble

https://www.wsj.com/finance/stocks/the-eerie-parallels-between-ai-mania-and-the-dot-com-bubble-f9...
2•JumpCrisscross•52m ago•0 comments

SpaceX Starts a Wall Street Bake-Off to Hire Banks for Possible IPO

https://www.wsj.com/finance/banking/spacex-starts-a-wall-street-bake-off-to-hire-banks-for-possib...
3•JumpCrisscross•52m ago•0 comments

Neuroevolution of Augmenting Topologies in JavaScript

https://github.com/joshuadam/NEAT-JavaScript
1•joshuadam•53m ago•1 comments

Ask HN: Is starting a personal blog still worth it in the age of AI?

6•nazarh•54m ago•5 comments

JavaScript Engine Security in 2025 [pdf]

https://saelo.github.io/presentations/poc_25_js_engine_security_in_2025.pdf
1•akyuu•57m ago•0 comments

Discover the best websites you've never heard about

https://viralwalk.com/
1•gnabgib•59m ago•0 comments

Evalite: Evaluate your LLM-powered apps with TypeScript

https://github.com/mattpocock/evalite
1•handfuloflight•1h ago•0 comments

Show HN: Gradient.bg – Aesthetic Gradient Generator

https://gradient.bg
1•floships•1h ago•1 comments

Show HN: I vibe coded a vibe marketing platform

https://postking.app
1•ditegashi•1h ago•0 comments

CCTV appeal after museum artefacts stolen (in UK)

https://www.avonandsomerset.police.uk/news/2025/12/cctv-appeal-after-museum-artefacts-stolen/
2•gnabgib•1h ago•0 comments

UEmacs/PK 4.0: Full screen editor based on MicroEMACS 3.9e

https://github.com/torvalds/uemacs
1•doener•1h ago•0 comments