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•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

Knight Rider car gets speeding ticket in NYC despite being in Illinois museum

https://abc7ny.com/post/knight-rider-car-kitt-gets-speeding-ticket-brooklyn-despite-being-display...
1•866-RON-0-FEZ•1m ago•0 comments

Designing a team of agents

https://blog.frankel.ch/design-team-agents/
1•saikatsg•12m ago•0 comments

A Good Lemma Is Worth a Thousand Theorems

https://sites.math.rutgers.edu/~zeilberg/Opinion82.html
1•susam•14m ago•0 comments

Consumers sue Amazon for not refunding Trump tariff costs

https://www.reuters.com/business/retail-consumer/consumers-sue-amazon-not-refunding-trump-tariff-...
2•Anon84•14m ago•0 comments

Tarvex ZM-1 – A compiler-free weight-stationary inference accelerator

https://medium.com/towards-artificial-intelligence/ai-data-centers-are-wasting-power-moving-data-...
1•tejakusireddy•18m ago•0 comments

After extensive work with agents, the non-technical sentence is the shape I see

https://sdocs.dev/s/qtIcZCIL#k=sHoAJ4Syfkv25404v5a3Ft4gJBPZwj7aAhquWmdzDPM
1•FailMore•19m ago•0 comments

Personalization and Privacy Choice

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4795118
1•1vuio0pswjnm7•19m ago•0 comments

What Is Code?

https://martinfowler.com/articles/what-is-code.html
1•saikatsg•21m ago•0 comments

Cerebras – Faster Tokens Please

https://newsletter.semianalysis.com/p/cerebras-faster-tokens-please
2•pretext•29m ago•0 comments

OpenAI super PAC paying for an army of Twitter bots to engage with their content

https://twitter.com/TheMidasProj/status/2055411833184399448
2•pretext•32m ago•1 comments

Tyouson – AI Practice tests for exams (www.tyouson.com)

1•Jaiyesh_Paraste•54m ago•0 comments

Xbox Is Now XBOX

https://www.theverge.com/news/931918/microsoft-xbox-rebrand-caps
2•namiwang•57m ago•0 comments

Frosthyon: AI assistant for 3D and general workflows

https://lumithyon.com
1•David_Founder•58m ago•0 comments

Who's composing music for my washing machine?

https://podcasts.apple.com/us/podcast/whos-composing-music-for-my-washing-machine/id73329284?i=10...
1•gmays•1h ago•0 comments

Agent Harness Engineering

https://www.oreilly.com/radar/agent-harness-engineering/
1•Garbage•1h ago•0 comments

Ask HN: Share concrete examples of benefits from AI usage

1•ChaitanyaSai•1h ago•0 comments

The ISO 216 "A4" paper system is broken (rounding errors) [video]

https://www.youtube.com/watch?v=XllQPr8FtPE
1•fsckboy•1h ago•1 comments

Ebola outbreak with uncommon strain erupts in Congo and Uganda; 65 deaths

https://arstechnica.com/health/2026/05/ebola-outbreak-confirmed-in-congo-and-uganda-246-suspected...
1•tatersolid•1h ago•0 comments

Accelerating Dynamics of Collective Attention

https://pmc.ncbi.nlm.nih.gov/articles/PMC6465266/
1•James72689•1h ago•0 comments

AtOnce

https://atonce.com
1•Asimtar•1h ago•0 comments

Show HN: AI that audits your codebase in 60 seconds

https://triyambakam-apex-corp.hf.space
2•haapatel•1h ago•0 comments

Which AI Model Asks Questions Intelligently?

1•aashu_bel•1h ago•0 comments

SymPy – a Python library for symbolic mathematics

https://docs.sympy.org/latest/tutorials/intro-tutorial/intro.html
1•tzury•1h ago•0 comments

The case for Python + HTMX over React

https://dev.to/syedahmershah/react-is-overkill-why-python-htmx-is-dominating-in-2026-17ib
5•indigodaddy•1h ago•0 comments

TikTok Performance Problems and Feed Instability: What's Going Wrong and How To

http://www.fixtech.co.ke/2026/05/tiktok-performance-problems-and-feed.html
1•rindodi•1h ago•0 comments

Henry Ford on Thomas Edison

1•silexia•1h ago•1 comments

Did we just time-traveled?

https://github.com/xs-lang0/xs
1•modinfo•1h ago•2 comments

The Fragmented Simulation Hypothesis:A computational modelfor why DéjàVu happens

https://medium.com/@scsteffes/a-computational-hypothesis-for-déjà-vu-the-fragmented-simulation-er...
1•LiquidSmooth•1h ago•0 comments

Who are the Japanese? DNA discovery rewrites history

https://www.sciencedaily.com/releases/2026/05/260514003314.htm
1•stmw•1h ago•0 comments

Overworked AI Agents Turn Marxist, Researchers Find

https://slashdot.org/story/26/05/14/067254/overworked-ai-agents-turn-marxist-researchers-find
2•tom2026hn•1h ago•1 comments