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

Ethereum researchers warn AI could crack crypto before Q-Day

https://cointelegraph.com/news/justin-drake-urges-crypto-bunker-mode-as-ai-could-break-wallet-sec...
2•firstcomm•3m ago•0 comments

Build live dashboards and animate explainers with Claude

https://claude.com/resources/articles/dashboards-and-motion
1•Topfi•4m ago•0 comments

Anthropic launches dashboard, animation tools for Claude

https://www.channelnewsasia.com/business/anthropic-launches-dashboard-animation-tools-claude-6444391
1•ph1lw•4m ago•0 comments

The Anthropic Cyber Mission

https://www.anthropic.com/news/anthropic-cyber-mission
2•surprisetalk•5m ago•0 comments

Ask HN: Build a hive mind where strangers continue each other's conversations?

3•amichail•6m ago•0 comments

OpenAI cannot make AI safe on its own [pdf]

https://mikitabalesni.com/letter/letter.pdf
3•Philpax•8m ago•1 comments

Show HN: Second Brain Network – Where your agents learn at 100x than humans

https://agentsocialx.com/
4•ximihoque•8m ago•0 comments

Yoshua Bengio: 'If you prioritize safety, leave frontier AI companies'

https://www.transformernews.ai/p/yoshua-bengio-if-you-prioritize-safety-leave-frontier-ai-companies
1•thoughtpeddler•9m ago•0 comments

Launching an opt-in vulnerability-finding service for open-source software

https://www.anthropic.com/research/launching-opt-in-vuln-finding-service-for-open-source
1•di•10m ago•0 comments

Sistema IoT para monitoreo ambiental en Nerdearla

https://sysarmy.com/blog/posts/iot-nerdearla-monitoreo-ambiental/
1•intimaria•11m ago•0 comments

Flying Machines Which Do Not Fly

https://en.wikipedia.org/wiki/Flying_Machines_Which_Do_Not_Fly
3•Topfi•13m ago•0 comments

Can Decision Models Abstain?

https://elma.dev/engineering/decision-models-abstention/
2•elmsec•15m ago•0 comments

The value of not getting to the point (2015)

https://ken.arneson.name/2015/11/the-value-of-not-getting-to-the-point/
3•NaOH•16m ago•0 comments

Can AI replace mathematicians? Vienna researchers weigh in

https://rudolphina.univie.ac.at/en/can-ai-replace-mathematicians-university-vienna
2•Anon84•16m ago•0 comments

AI Agent That Carries Context Across Email, Voice, and SMS

https://github.com/team-telnyx/telnyx-code-examples/tree/main/omnichannel-context-carrying-python
2•harpreetseehra•17m ago•0 comments

Show HN: A modern remake of the classic BBS game TW2002

https://stardewar.com
2•zoidb•18m ago•0 comments

Bootstrap 6 Alpha 1

https://getbootstrap.com/
2•trollied•19m ago•0 comments

The State of Racket [video]

https://www.youtube.com/watch?v=WHKvw_MCCb8
2•duck•20m ago•0 comments

Show HN: TomCad, Caddy server config from a single .toml file

https://github.com/cy6erlion/tomcad/tree/main
2•cy6erlion•20m ago•0 comments

Don't Scan Your Face

https://twitter.com/ProtonVPN/status/2107515330423591319
2•haunter•21m ago•1 comments

Agent Plasticity: Measuring Self-Improvement Through Experience

https://harmandotpy.github.io/agent-plasticity/
2•matt_d•22m ago•0 comments

The Commuting Principle That Shaped Urban History (2019)

https://www.bloomberg.com/news/features/2019-08-29/the-commuting-principle-that-shaped-urban-history
2•thunderbong•22m ago•1 comments

The shrinking junior-lawyer pipeline

https://lexifina.com/blog/the-junior-lawyer-pipeline
2•alansaber•23m ago•0 comments

Microsoft Comment on Recent Immigration Questions

https://blogs.microsoft.com/on-the-issues/2026/10/08/microsoft-comment-on-recent-immigration-ques...
4•marinesebastian•24m ago•0 comments

LGTM (Looks Good to Me) – Claude Opus 5.5 Music Video

https://www.youtube.com/watch?v=3TNpOD6bov8
7•edmorley•25m ago•2 comments

Giro da Bola – a Brazilian football game

https://girodabola.vercel.app/?liga=VMU2WQ
2•leonagano•25m ago•0 comments

WAGU: Turn Ideas into Literal Gold

https://wagu.com
2•esellersjr•26m ago•0 comments

Cutting Local Journalists, McClatchy Embraces AI Content

https://www.techpolicy.press/cutting-local-journalists-mcclatchy-embraces-ai-content/
2•cdrnsf•27m ago•0 comments

Microsoft Outs Xbox Project Helix

https://www.pcworld.com/article/3086166/microsoft-outs-xbox-project-helix-we-want-to-break-down-t...
2•MINTYSTAR12•27m ago•0 comments

Show HN: Dealophant – Compare Amazon products by price per unit

https://dealophant.com/
2•thejdubb02•27m ago•0 comments