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

Japan, South Korea and Taiwan are suffering industrial rot

https://www.economist.com/finance-and-economics/2026/05/27/japan-south-korea-and-taiwan-are-suffe...
1•jnord•52s ago•1 comments

Predicting the 2026 World Cup: Can Anyone Stop Spain?

https://dtai.cs.kuleuven.be/sports/blog/predicting-the-2026-world-cup:-can-anyone-stop-spain/
1•fvankers•8m ago•0 comments

Musk's cut to USAID have made the Ebola outbreak worse

https://www.dw.com/en/ebola-central-africa-us-aid-cuts-uganda-drc-who-vaccines/a-77233437
3•camillomiller•8m ago•0 comments

Can Intel Save America?

https://www.thefp.com/p/can-intel-save-america
1•jazzdev•11m ago•0 comments

SlimTide Exploding in 2026: Viral Weight Management Trend

https://finance.yahoo.com/sectors/healthcare/articles/slimtide-capsules-exploding-2026-slim-19370...
1•farqnaht•13m ago•0 comments

1-Click RCE in Flowise (CVE-2026-40933)

https://www.obsidiansecurity.com/blog/when-is-stdio-mcp-actually-a-vulnerability
1•13ph03nix•15m ago•0 comments

Dispatches from the possibly last days of human relevance

https://scottaaronson.blog/?p=9782
1•gone35•16m ago•0 comments

Don't Delegate the Joy of Building to AI

https://bacist.com/joy-of-building/
1•baCist•16m ago•1 comments

Websites have a new way to spy on visitors: analyzing their SSD activity

https://arstechnica.com/security/2026/05/websites-have-a-new-way-to-spy-on-visitors-analyzing-the...
1•XzetaU8•19m ago•0 comments

Where is API tooling lacking?

1•dhruv3006•19m ago•0 comments

Omniclip: Open-source, powerful video editor right in the browser

https://github.com/omni-media/omniclip
1•maxloh•20m ago•0 comments

Halted ARM64 Port Work

https://github.com/rcarmo/haiku-arm64-build
1•rcarmo•21m ago•0 comments

I Stopped Designing Forms for Only Humans

https://www.indiehackers.com/post/i-stopped-designing-forms-for-only-humans-893ed23599
1•Lovanut•21m ago•0 comments

A one-word answer to why EU lost control of Big Tech: Ireland

https://euobserver.com/218423/a-one-word-answer-to-why-eu-lost-control-of-big-tech-ireland/
2•nemoniac•24m ago•1 comments

Is it better to have fewer components?

https://alokit.substack.com/p/four-components-each-90-reliable
1•avikalp•26m ago•1 comments

UK's rudest chalk figure gets a glow-up to stop it fading in the rain

https://www.bbc.co.uk/news/articles/cpvppe84lnvo
1•FartyMcFarter•28m ago•0 comments

Space, time and Shakespeare – Paul Glendinning [video]

https://www.youtube.com/watch?v=iMHvwhXFrNQ
1•vismit2000•32m ago•0 comments

Breaking macOS App Sandbox with Archive Utility

https://mysk.blog/2026/05/19/cve-2026-28910/
1•goranmoomin•33m ago•0 comments

Even if every California billionaire left tomorrow, it would take 25 years...

https://finance.yahoo.com/economy/policy/articles/even-every-california-billionaire-left-16491874...
1•1vuio0pswjnm7•35m ago•1 comments

Rivian will deliver the first R2 SUVs on June 9

https://techcrunch.com/2026/05/27/rivian-will-deliver-the-first-r2-suvs-on-june-9/
1•01-_-•37m ago•0 comments

Giant cockroach statue brings new life to shrinking Nara village

https://mainichi.jp/english/articles/20260527/p2g/00m/0na/048000c
2•rawgabbit•37m ago•0 comments

Ottawa's latest deal with U.S. data giant Palantir raises warnings

https://www.thestar.com/politics/federal/ottawas-latest-deal-with-us-data-giant-palantir-raises-w...
1•01-_-•37m ago•0 comments

The Ridgeway

https://www.historic-uk.com/HistoryMagazine/DestinationsUK/The-Ridgeway/
1•mellosouls•38m ago•0 comments

Google engineer charged with using inside information to win $1.2M on Polymarket

https://www.washingtonpost.com/technology/2026/05/27/google-employee-charged-with-insider-trading...
3•1vuio0pswjnm7•38m ago•0 comments

TopRec (toprec.io) – AI screening and CRM for recruiters and hiring teams

https://toprec.io
1•girish-fokusly•44m ago•0 comments

The fog is alive: bacteria in fog droplets clear toxins from air

https://news.asu.edu/20260514-environment-and-sustainability-fog-alive-researchers-discover-bacte...
2•XzetaU8•48m ago•0 comments

Rust Will Save Linux from AI, Says Greg Kroah-Hartman

https://www.zdnet.com/article/rust-will-save-linux-from-ai-says-greg-kroah-hartman/
2•signa11•48m ago•0 comments

Amazon to Acquire Apple's Globalstar Stake in Satellite Deal

https://www.macrumors.com/2026/05/27/amazon-apple-globalstar-deal/
1•mgh2•49m ago•0 comments

Ebola exposed Americans blocked from US return

https://arstechnica.com/health/2026/05/us-walls-itself-off-from-ebola-beefed-up-travel-ban-no-cit...
1•M_bara•55m ago•1 comments

AI Is Starting to Hit Power Grid Limits Simple, Crédible, Ouvre La Discussion

https://nypost.com/2026/05/22/business/data-center-debacle-roiling-midterms-as-ai-may-have-to-pay/
3•latentframe•56m ago•1 comments