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

Show HN: Pokayoke – turn repo conventions into deterministic checks for agents

1•sarreph•3m ago•0 comments

How can we make Twitter friendlier

2•RoastSlop•8m ago•0 comments

Dynamo Draughts. 10x10 game for DOS, open source

https://orac81.itch.io/dynamo-draughts
2•orac81•8m ago•0 comments

Show HN: Petabyte-scale storage for AI agent sandboxes

https://twitter.com/aniketmaurya/status/2072249879573754225
2•theaniketmaurya•11m ago•1 comments

Solar Panels: AC vs. DC (2008)

https://rimstar.org/renewnrg/solarpwr.htm
1•tetris11•12m ago•0 comments

Google Gemini Claims to be "structurally protective" of Donald Trump

https://www.thatprivacyguy.com/blog/google-ai-guardrails-protect-trump/
2•AlexanderHanff•13m ago•1 comments

Single Dose of Frog-Derived Gut Bacterium Eradicates 100% of Tumors in Mice

https://www.thefocalpoints.com/p/new-study-frog-derived-gut-bacterium
1•mpweiher•14m ago•0 comments

Vast Majority support clampdown on social media to protect children

https://www.ippr.org/media-office/vast-majority-support-clampdown-on-social-media-to-protect-chil...
1•vrganj•19m ago•0 comments

I'm Building an App to make $10k/month and I'm Recording the whole thing

https://twitter.com/jomatech/status/2071774976173355221
1•rzk•22m ago•0 comments

Show HN: Fail2ban-Dashboard

https://github.com/webishdev/fail2ban-dashboard
1•musicmatze•23m ago•0 comments

The evolution of window and class extra bytes in Windows

https://devblogs.microsoft.com/oldnewthing/20260629-00/?p=112484
1•Stratoscope•23m ago•0 comments

Building AI for Production Requires More Engineering Than AI

https://geekyants.com/blog/the-hidden-cost-of-delaying-ai-product-modernization-in-enterprise-bus...
2•Max536752•23m ago•0 comments

Bloomberg: Spain Built Too Much Solar. Investors Want Out

https://www.bloomberg.com/news/articles/2026-06-29/spain-s-solar-and-wind-power-boom-is-an-invest...
3•vblanco•26m ago•2 comments

Scientists say most people need more protein than current guidelines suggest

https://www.sciencedaily.com/releases/2026/06/260622091429.htm
2•bushwart•27m ago•1 comments

What If a City Ran on UTC for Two Weeks?

https://zulu.sekor.eu.org/
1•modinfo•30m ago•0 comments

Getty Images Plans to End Shutterstock Deal After U.K. Imposes Conditions

https://www.wsj.com/business/getty-images-plans-to-end-shutterstock-deal-after-u-k-imposes-condit...
1•thm•31m ago•0 comments

Thoughts on the Near Future

https://xcancel.com/i/article/2072056960430789032
1•alecco•32m ago•1 comments

Anthropic launches Claude Science, Google and OpenAI racing to compete

https://techfundingnews.com/anthropic-launches-claude-science-and-google-and-openai-are-already-r...
2•enlightpixel•33m ago•0 comments

34,266 repos were scanned: 1 in 4 orgs showed gaps in AI agent config files

https://blog.codacy.com/we-scanned-34266-repos.-1-in-4-orgs-showed-gaps-in-ai-agent-config-files
1•claudiacsf•33m ago•0 comments

Turning Supacode into a Full, Agent First IDE

https://corti.com/turning-supacode-into-a-full-ide-flexible-panes-for-agents-editor-file-manageme...
1•TechPreacher•35m ago•0 comments

Ente Is Open

https://ente.com/open/
4•shaunpud•39m ago•0 comments

Open-source Claude/Codex/Cursor limits tracker for Mac

https://github.com/aalksii/creditwatcher
1•aalksii•41m ago•0 comments

Ocean surface temperatures hit a record high for June

https://www.theguardian.com/environment/2026/jul/01/ocean-surface-temperatures-hit-a-record-high-...
1•montalbano•41m ago•0 comments

Getty's Shutterstock merger falls apart

https://www.theverge.com/tech/960047/getty-shutterstock-merger-agreement-termination
1•rarisma•45m ago•0 comments

Free online tools in one place

https://www.quelloai.com
1•gusdestro•45m ago•1 comments

Siplinx AI Meeting Notetaker for Zoom, Google Meet

https://siplinx.com
1•aman-flyprox•46m ago•0 comments

Neuralink: Our First Transdural Procedure [video]

https://www.youtube.com/watch?v=F8p2MamNBgE
1•Klaster_1•46m ago•0 comments

The Primitive Is the Product

https://www.amplifypartners.com/blog-posts/the-primitive-is-the-product
1•tosh•46m ago•0 comments

How Spotify Is Killing the Open Podcast Ecosystem (2020)

https://singhkays.com/blog/how-spotify-is-killing-the-open-podcast-ecosystem/
1•downbad_•47m ago•0 comments

Sonnet 5 Is Dead in the Water

https://www.vincentschmalbach.com/sonnet-5-is-dead-in-the-water/
3•vincent_s•49m ago•0 comments