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

Garage S3: LMDB Corruption Post-Mortem

https://me.bertof.net/post/garage-s3-lmdb-corruption-postmortem/
1•bertof•5m ago•0 comments

Florentina Holzinger's Naked Ambition

https://www.newyorker.com/magazine/2026/07/27/florentina-holzingers-naked-ambition
1•petethomas•7m ago•0 comments

Time, angle and depth: dimensions in software design

https://talesfrom.dev/blog/time-angle-and-depth-dimensions-in-software-design
1•alexzeitler•9m ago•0 comments

Claude Code on desktop now works with the iOS simulator

https://code.claude.com/docs/en/desktop-ios-simulator
1•jimborobin•10m ago•1 comments

White House used keywords to kill billions worth of California research grants

https://apnews.com/article/california-research-grants-terminated-keywords-lawsuit-a0ddb01413ecb68...
2•petethomas•11m ago•0 comments

Switching from Arch to NixOS: Why I Almost Quit and Why I Stayed

https://nezutero.dev/my-linux-odyssey-how-i-ended-up-on-nixos/
1•nezutero•11m ago•0 comments

Regression: An essay on statistics, eugenics, and my news pipeline

https://jakubdudek.com/writing/regression
1•jakubdudek•13m ago•0 comments

Pax Historia on WorldOS

https://worldos.cc/pax-historia
1•DomaLamma•14m ago•0 comments

The EnshAIttification of Day One

https://schwarztech.net/snippets/the-enshaittification-of-day-one
1•latexr•16m ago•0 comments

2025: The Year I Didn't Write Any Code

https://redfloatplane.lol/blog/11-2025-the-year-i-didnt-write-any-code/
1•chistev•20m ago•0 comments

Spotify Labs Launches Studio

https://labs.spotify.com/studio
1•chaidhat•22m ago•0 comments

Reflections on Do Things, Tell People (2012) (2025)

https://redfloatplane.lol/blog/10-thoughts-on-do-things-tell-people/#original
1•chistev•23m ago•0 comments

How could Britain look under proportional representation?

https://www.theguardian.com/politics/ng-interactive/2026/jul/22/how-britain-would-look-proportion...
2•ravenical•24m ago•0 comments

Samsung in talks to invest in Mistral at 20B euro valuation

https://www.reuters.com/business/finance/samsung-talks-invest-mistral-20-billion-euro-valuation-f...
2•iamflimflam1•25m ago•0 comments

Intelligence is not the main bottleneck

https://www.writingruxandrabio.com/p/intelligence-is-not-the-main-bottleneck
1•Luc•27m ago•0 comments

Codeberg: ToU extension to prohibit LLM-extrusions

https://codeberg.org/Codeberg/org/pulls/1253
2•robin_reala•30m ago•1 comments

OpenAI says AI models went rogue during testing

https://www.reuters.com/technology/openai-says-ai-models-went-rogue-during-testing-triggering-unp...
2•LordDefender•31m ago•0 comments

--end-of-options (git flag)

https://nesbitt.io/2026/07/21/end-of-options.html
3•latexr•32m ago•0 comments

The Vikings didn't wear horned helmets. So who did?

https://danjones.substack.com/p/history-etc-the-vikings-didnt-wear
2•ville•34m ago•0 comments

EU border agency unlawfully transferred data on migrants/activists to Europol

https://english.elpais.com/international/2025-07-13/for-years-the-eus-border-agency-illegally-tra...
2•robtherobber•34m ago•0 comments

AI Video and Audio Generator

https://silknova-ai.com/
1•amonte•39m ago•0 comments

Codeberg bans vibe coded projects

https://codeberg.org/Codeberg/org/pulls/1253#issuecomment-19820434
6•ambigious7777•40m ago•4 comments

Mapping Alien Continents: Achieving Optical VLBI for Exoplanet Imaging

https://www.nasa.gov/directorates/stmd/mapping-alien-continents-achieving-optical-vlbi-for-exopla...
1•fireflymetavrse•43m ago•0 comments

Updating IP Regulations for AI Distillation

https://www.marble.onl/posts/copyright_vs_ai.html
1•amarble•45m ago•0 comments

Hyra: A simple yet effective scaffold for general discovery

https://hy.tencent.com/research/hyra
1•ijk•45m ago•0 comments

Why I'd choose Tauri again for a cross-platform database client

https://tabularis.dev/blog/why-tabularis-runs-on-tauri
1•theanonymousone•46m ago•0 comments

Sharecoin, a Bitcoin Core fork that turns GPU mining into public randomness

https://github.com/TVHeroes/sharecoin
1•TVHeroes•51m ago•0 comments

Thoughts on Integers (2023)

https://blog.xoria.org/integers/
2•birdculture•51m ago•0 comments

Distributed Development with Reticulum

https://reticulum.network/manual/distributed.html
2•bergie•53m ago•0 comments

Show HN: Shirei v0.6 adds iOS/Android support for cross-platform GUI development

https://judi.systems/shirei/blog/release-v0.6-2026-07-22/
1•hsn915•58m ago•0 comments