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

Texas Adds Another Solar Farm as Ercot Grid Demand Soars

https://electrek.co/2026/06/01/texas-adds-another-huge-solar-farm-ercot-grid-demand-soars/
1•m463•1m ago•0 comments

Perfect randomness realised for the first time

https://ethz.ch/en/news-and-events/eth-news/news/2026/05/perfect-randomness-realised-for-the-firs...
1•jonbaer•2m ago•0 comments

User-Replaceable Batteries Are Coming Back in a Big Way

https://www.theverge.com/column/939026/user-replaceable-batteries-eu-european-union-legislation
1•m463•4m ago•0 comments

Rsync and Outrage

https://medium.com/@tridge60/rsync-and-outrage-d9849599e5a0
1•st3fan•4m ago•0 comments

More police turn to simple drones clever effort to catch illegal e-bike riders

https://electrek.co/2026/06/02/more-police-turn-to-simple-drones-in-clever-effort-to-catch-illega...
1•Bender•5m ago•0 comments

China's Rise in Drug Development Looms over U.S.

https://www.nytimes.com/2026/05/30/business/china-lung-cancer-drugs-asco.html
1•lxm•6m ago•0 comments

PostgreSQL CLI Setup

https://sandrock.co.za/carl/2026/05/my-postgresql-cli-setup/
1•chthonicdaemon•6m ago•0 comments

The Four Signals of AI Observability

https://thoughtbot.com/blog/the-four-signals-of-ai-observability
1•iroha1203•7m ago•0 comments

HHS is overriding peer review to require changes to research scope, design

https://www.science.org/content/article/exclusive-hhs-now-weighing-science-nih-grants
2•SubiculumCode•13m ago•0 comments

NC lawmakers target 'addictive' apps in teen social media bill

https://www.wral.com/news/nccapitol/north-carolina-lawmakers-weigh-social-media-restrictions-unde...
2•01-_-•15m ago•0 comments

Florida sues OpenAI and CEO Altman, claiming company concealed serious risks

https://apnews.com/article/sam-altman-openai-lawsuit-florida-396d70c5a2d9bae7e95a8ee9adaef836
2•1vuio0pswjnm7•15m ago•0 comments

The case for memory safe desktop Linux distribution

http://fiedzia.blogspot.com/2026/06/the-case-for-memory-safe-desktop-linux.html
1•fiedzia•17m ago•0 comments

Vaping alters genes linked to cancer, heart and lung disease

https://www.dailymail.com/health/article-15866661/Vaping-genes-cancer-heart-lung-disease.html
1•Bender•17m ago•0 comments

The Bluesky firehose if everyone was messaging you

https://hah.spencer.place/messages
2•4lx87•18m ago•0 comments

GameStop Discloses First Quarter 2026 Results

https://investor.gamestop.com/news-releases/news-details/2026/GameStop-Discloses-First-Quarter-20...
1•mmh0000•20m ago•0 comments

A Whole Generation Seems to Be Using 'POV' Wrong

https://www.nytimes.com/2026/06/01/magazine/pov-gen-z-linguistics.html
1•lxm•24m ago•0 comments

Show HN: AI-Powered PDF to Markdown Converter

https://pdftomdconverter.com
1•QingWu•25m ago•2 comments

Google's $80B equity raise adds to that giant AI sucking sound

https://www.ft.com/content/2fe1fff9-f619-4a25-9b30-05bdc3bdea70
2•1vuio0pswjnm7•25m ago•0 comments

Back to the Metal

https://betocmn.com/blog/back-to-the-metal/
2•bertdc•26m ago•0 comments

AI Corporate Governance and Ben & Jerry's Risk

https://corpgov.law.harvard.edu/2026/05/11/ai-corporate-governance-and-ben-jerrys-risk/
1•ChrisArchitect•28m ago•1 comments

More harmful than helpful': young people sour on AI

https://www.ft.com/content/73fc962e-ce68-4521-9c5d-841a666eed10
3•1vuio0pswjnm7•29m ago•1 comments

Show HN: LiteHarness – One SDK for Claude Agent, OpenAI Agent, Pi AI

https://github.com/LiteLLM-Labs/lite-harness
1•ij23•39m ago•1 comments

Scott Pelley fired at CBS News after blowups with Bari Weiss,60 Minutes producer

https://www.foxnews.com/media/scott-pelley-fired-cbs-news-after-blowups-bari-weiss-new-60-minutes...
7•osnium123•43m ago•0 comments

Show HN: SeaTicket – AI agent that resolve issues from GitHub, email and forums

1•Daniel-Pan•43m ago•1 comments

The New Internet Era

https://blogs.newardassociates.com/blog/2026/titit-llms-and-internet.html
1•damowangcy•45m ago•0 comments

At the Autograph Show

https://oldster.substack.com/p/at-the-autograph-show
1•NaOH•45m ago•0 comments

Tab Tender – Split the bar tab in seconds

https://tabtender.app
1•MitchelRut•46m ago•1 comments

From Silos to Service Topology: Why Netflix Built a Real-Time Service Map

https://netflixtechblog.com/from-silos-to-service-topology-why-netflix-built-a-real-time-service-...
2•mazinz•46m ago•0 comments

Intel Is Struggling to Supply Laptop Chips Built Around Its New 18A Node

https://www.culpium.com/p/intel-is-struggling-to-supply-laptop
2•osnium123•47m ago•0 comments

Microsoft Is Bricking the Perpetual Version of Office 2019 for Mac

https://support.microsoft.com/en-us/office/update-microsoft-365-or-office-on-your-macos-or-ios-de...
4•tech234a•48m ago•0 comments