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

Vibe code your next presentation

https://www.variant.art/
1•harpooned•3m ago•1 comments

The Bureau Outlives the Engine

https://uaxd.fr/dispatches/the-bureau-outlives-the-engine.html
1•enoch_cg•10m ago•0 comments

A Claude Code and Codex Skill for Deliberate Skill Development

https://github.com/DrCatHicks/learning-opportunities
2•cdrnsf•19m ago•0 comments

NYC*Bug May 2026: The Design of Unix Shell, with Stephen R. Bourne

https://www.youtube.com/watch?v=Anr2UAs7ifY
1•bluesounddirect•19m ago•1 comments

Andrew's Layoff Checklist

https://docs.google.com/document/d/1FaDxhnCXsneXbel5XVRAyX0Ce1RyC1F__wGboBBPlBM/edit?tab=t.0
1•mooreds•25m ago•0 comments

NASA's James Webb Space Telescope Photostream

https://www.flickr.com/photos/nasawebbtelescope/
1•mooreds•26m ago•1 comments

Reddit Is (Mostly) Shuttering R/All, but There's Still a Way to Access It

https://lifehacker.com/tech/reddit-is-mostly-shutting-down-r-all?test_uuid=zXnWOLjQQwkYjMVwrvo5w&...
1•big_toast•29m ago•0 comments

Charity Majors on AI, Observability, and the Future of Software [audio]

https://scalingdevtools.com/podcast/episodes/charity
1•mooreds•31m ago•0 comments

Ask HN: Are SaaS businesses going to zero?

1•nomilk•31m ago•6 comments

Eliza: Natural Language Processing from 1967

https://en.wikipedia.org/wiki/ELIZA
1•frasermarlow•31m ago•1 comments

On-Device Real-Time Speech-to-Speech Translation [video]

https://www.youtube.com/watch?v=D9id2Dgv_OM
1•kenarsa•35m ago•0 comments

My life was changed by four sentences in four books

https://sive.rs/4s4b
3•James72689•35m ago•0 comments

Show HN: Sync creative assets to any CMS

https://syncific.com
2•lightsyncpro•37m ago•0 comments

Show HN: Short links and dynamic QR codes you can white-label as your own SaaS

https://linked.codes/
1•attendos•39m ago•0 comments

Measuring the Self-Reported Impact of Early-2026 AI on Tech Worker Productivity

https://metr.org/blog/2026-05-11-ai-usage-survey/
1•willmarch•39m ago•1 comments

Show HN: Containarium – self-hosted sandbox for AI agents, MCP-native

https://github.com/footprintai/Containarium
1•hsin003•46m ago•0 comments

Microsoft BitLocker – YellowKey zero-day exploit

https://www.tomshardware.com/tech-industry/cyber-security/microsoft-bitlocker-protected-drives-ca...
12•cookiengineer•47m ago•2 comments

Terax – Lightweight (7MB) AI Terminal Emulator (ADE) in Rust, Tauri, and React

https://terax.app
2•nikolay•54m ago•1 comments

CVE-2026-45793: Anatomy of a 14-Hour PHP Supply-Chain Near-Miss

https://github.com/graycoreio/github-actions-magento2/discussions/261
1•damienwebdev•55m ago•1 comments

MacBook Neo Review: The Laptop for the Rest of Us

https://fireborn.mataroa.blog/blog/macbook-neo-review-the-laptop-for-the-rest-of-us/
5•vinhnx•55m ago•1 comments

Gaining control of every projector and camera on campus

https://www.edna.land/blogs/posts/scanning/
2•ednaordinary•55m ago•1 comments

Butter Box – Sharing offline has never been easier

https://likebutter.app/
2•MRPockets•57m ago•0 comments

Extortion Using Smart Glasses Is a Thing Now

https://gizmodo.com/extortion-using-smart-glasses-is-a-thing-now-2000755562
2•dataflow•1h ago•0 comments

Show HN: MerryDiv – Track dividends across all your brokerage accounts

https://www.merrydiv.com/
2•zouko•1h ago•0 comments

Tell HN: Starting June 15, claude -p usage will change

2•andersonmvd•1h ago•2 comments

LinkedIn planning to lay off 5% of staff

https://www.reuters.com/business/world-at-work/linkedin-is-planning-lay-off-5-staff-latest-tech-s...
10•doppp•1h ago•1 comments

The Chip War Nobody Saw Coming: Samsung vs. SK Hynix

1•xurgadis•1h ago•1 comments

SwiftUI Is a Disaster

https://ben1777.substack.com/p/swiftui-is-a-disaster
1•bentocorp•1h ago•0 comments

Harvey's Legal Agent Benchmark

https://www.harvey.ai/blog/introducing-harveys-legal-agent-benchmark
1•gmays•1h ago•0 comments

The Ten Commands of the Nine Divines

https://en.uesp.net/wiki/Lore:Ten_Commands:_Nine_Divines
1•alhazrod•1h ago•0 comments