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

GraphQL MCP Server and GraphiQL Plugins

https://graphql-mcp.com/
1•robjampar•1m ago•1 comments

OpenAI limits latest ChatGPT product to Trump-approved customers

https://www.bnnbloomberg.ca/business/artificial-intelligence/2026/06/26/openai-limits-its-latest-...
1•MadrasTh0rn•2m ago•0 comments

Show HN: Self hosting a modern LLM stack

https://github.com/raiyanyahya/llmaker
2•sleepynoodle•5m ago•1 comments

Germans are researching their Nazi past as the far right urges them to move on

https://www.cnn.com/2026/06/28/europe/germans-nazi-past-far-right-intl
2•Tomte•9m ago•0 comments

How can engineering leaders avoid becoming Bond villains?

https://stackoverflow.blog/2026/06/26/paging-charity-how-can-engineering-leaders-avoid-becoming-b...
2•backlit4034•10m ago•0 comments

The Richest Country Is Pretty Mid Now [video]

https://www.youtube.com/watch?v=4FZy1lBNykA
1•locusm•10m ago•0 comments

Efficiency in LLMs – Part 1 – Columbia Machine Learning Summer School 2026 [video]

https://www.youtube.com/watch?v=zcWJCKsODZk
2•matt_d•14m ago•0 comments

Towards Understandable Software

https://gracefulliberty.com/articles/towards-understandable-software/
2•signa11•15m ago•0 comments

Chinese farmer and his 70k chickens become online celebrities [video] (2019)

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

Silent Weapons for Quiet Wars

https://archive.org/details/silent-weapons-for-quiet-wars_202110
5•jupr•22m ago•4 comments

Learn how coding agents are built

https://twotimespi.dev/
3•nreece•24m ago•0 comments

Redesign of US Government websites stokes surveillance fears

https://www.theguardian.com/us-news/2026/jun/28/government-website-visitor-tracking-surveillance-...
6•devonnull•25m ago•0 comments

Book of American Types – ATF Standard Faces, 1934

https://archive.org/details/ATFBookOfAmericanTypes1934
2•everybodyknows•32m ago•0 comments

Australia toughens social media ban, doubles potential penalties for tech firms

https://www.reuters.com/business/media-telecom/australia-toughens-kids-social-media-ban-doubles-p...
3•1vuio0pswjnm7•33m ago•1 comments

'The cult of Elon': SpaceX investors grapple with volatility amid big swings

https://www.cnbc.com/2026/06/26/spacex-volatility.html
3•1vuio0pswjnm7•35m ago•0 comments

Low dose Naltrexone [video][9 mins]

https://www.youtube.com/watch?v=S5Y_ShsPTpQ
2•Bender•36m ago•0 comments

Billionaire Jeremy Grantham says Bitcoin will 'dwindle away with a whimper'

https://www.cnbc.com/2026/06/26/billionaire-investor-jeremy-grantham-says-bitcoin-will-dwindle-aw...
5•1vuio0pswjnm7•36m ago•0 comments

David Sedaris on his Duolingo obsession

https://www.theguardian.com/books/2026/jun/28/david-sedaris-duolingo-obsession-the-land-and-its-p...
2•andsoitis•38m ago•0 comments

Nostalgia – it's not like it used to be (2012)

https://www.bbc.com/news/magazine-20726824
2•ryandrake•49m ago•0 comments

Clean Code: Second Edition Critique

https://bugzmanov.github.io/cleancode-critique/clean_code_second_edition_review.html
2•bmacho•50m ago•0 comments

The church members disagree on politics. Together theyre wiping out medical debt

https://www.npr.org/2026/06/28/nx-s1-5847966/medical-debt-politics-republican-democrat
3•Jimmc414•50m ago•0 comments

Memory Safe Context Switches

https://fil-c.org/context_switches
3•pizlonator•52m ago•0 comments

Tailwind

https://www.kevinsdias.com/posts/tailwind.html
4•diasks2•53m ago•0 comments

The Hunt for the Death Valley Germans

https://otherhand.org/home-page/search-and-rescue/the-hunt-for-the-death-valley-germans/
2•signa11•54m ago•0 comments

Consistency, but in Excellence Not Appearance – Jim Nielsen's Blog

https://blog.jim-nielsen.com/2026/a-consistency-of-excellence/
3•tambourine_man•55m ago•0 comments

Blink If You're Human

https://dynomight.net/blink/
2•Curiositry•56m ago•0 comments

Polymarket traders revolted over one silly sillable

https://www.nytimes.com/2026/06/28/business/donk-polymarket-prediction-markets.html
4•croemer•58m ago•0 comments

Show HN: I Made a WebGPU Based Agent/Worlflow Explainer

https://tdu-naifen.github.io/AgentVisualization/
2•milkpowder101•1h ago•0 comments

The oracle problem is three thousand years old

https://pilgrima.ge/p/the-oracle-problem
3•momentmaker•1h ago•0 comments

Collider: A meson package manager – A hash proves the bytes, not the source

https://collider.ee/blog/2026-06-28-1500_a_hash_proves_the_bytes_not_the_source/https://collider....
2•mog_dev•1h ago•0 comments