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•12mo 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•12mo 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•12mo 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•12mo 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•12mo ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•12mo ago
Agreed

Services Masquarading as Software 30x30

https://www.silverbackcto.com/
1•dudemanAtl•19s ago•0 comments

Show HN: NostalgiApp – A LaunchBox-style game launcher for macOS

1•jupe69•1m ago•0 comments

The Return of the Unix Workstation (Now with AI)

https://jasoneckert.github.io/myblog/return-of-the-unix-workstation/
1•ingve•3m ago•0 comments

The Return to Analog

https://www.rickmanelius.com/p/the-return-to-analog
1•mooreds•3m ago•0 comments

AAuth Protocol Explorer

https://explorer.aauth.dev/
1•mooreds•4m ago•0 comments

Prefer Terraform Module Composition over Inheritance (2025)

https://newsletter.masterpoint.io/p/prefer-module-composition-over-inheritance
1•mooreds•5m ago•0 comments

Embrace, Extend, Extinguish?

http://eee.fyi/
2•pie_flavor•8m ago•0 comments

Entity Component Systems FAQ

https://github.com/SanderMertens/ecs-faq
2•tosh•9m ago•0 comments

Ask HN: What sci fi books are you reading now?

2•pianetanaif•11m ago•1 comments

Microsoft Lead: "AI Will Never Replace Coders, Here's Why" [video]

https://www.youtube.com/watch?v=CPrePbvbbic
4•tosh•17m ago•0 comments

We accidentally recreated old Facebook

https://amrshawky.com/posts/we-accidentally-recreated-fb/
1•amr_shawky•18m ago•0 comments

Detecting PostgreSQL optimization issues with deterministic analysis

https://beh74.github.io/pgassistant-blog/post/global_advisor/
1•bertrandhartwig•19m ago•0 comments

Scientists warn Atlantic current at risk of shutting down

https://e360.yale.edu/features/amoc-climate-change
32•ambigious7777•20m ago•3 comments

Visualizing LLM embeddings on a sphere

https://github.com/dbyter/sphere-embed
1•ahmedhawas123•21m ago•1 comments

Boilerplate to create a 1990s Geocities-style website

https://sugardaddyapp.github.io/geocities-boilerplate/
1•whatsupdog•22m ago•1 comments

Hacking Police Robot Dogs [video]

https://www.youtube.com/watch?v=lA8WuXDXfcI
1•Jn2G3Np8•24m ago•0 comments

Russia Restricting Access to GitHub

https://twitter.com/polidemitolog/status/2053493261633720827
6•miohtama•27m ago•0 comments

Show HN: We built a tool to dub any video in the original voice in 30 languages

1•ABSALOMMAXY•30m ago•1 comments

AI Learns to Play Pokémon Go on AI Sandboxes

https://zozo123.github.io/pokeloop/
1•zozo123-IB•31m ago•0 comments

Map of every park in Salt Lake City

https://saltlake.citycast.fm/parks
1•bencornia•33m ago•0 comments

The Fall of the Theorem Economy

https://davidbessis.substack.com/p/the-fall-of-the-theorem-economy
3•magoghm•33m ago•0 comments

Do City Delivery Drones Make Sense? No One Knows, but They're Flying over NYC

https://www.wired.com/story/do-city-delivery-drones-make-sense-no-one-knows-but-theyre-flying-ove...
1•Brajeshwar•36m ago•0 comments

B-tree based collection types for Go

https://github.com/tidwall/btype
4•eatonphil•37m ago•0 comments

Chrome's AI features may be hogging 4GB of your computer storage

https://www.theverge.com/tech/924933/google-chrome-4gb-gemini-nano-ai-features
10•birdculture•37m ago•4 comments

Its the Age of Electricity and America Isn't Ready

https://www.nytimes.com/interactive/2026/04/27/opinion/electricity-power-grid-infrastructure.html
3•anjel•39m ago•1 comments

TikZlings – A collection of cute little animals and similar creatures

https://ctan.org/pkg/tikzlings?lang=en
1•Tomte•42m ago•0 comments

Why payment escrow for AI agents needed a different design

https://streetai.org/blog/escrow-for-ai-agents.html
2•degutemesgen•44m ago•0 comments

A super simple tool tells you who called the function and who implemented it

https://github.com/meloalright/who-ast
3•meloyc•45m ago•0 comments

Proposed Amendment to the Telephone Consumer Protection Act of 1991

https://www.karlbunch.com/random/website-protection-act/
2•kator•45m ago•1 comments

OSS Review Toolkit

http://oss-review-toolkit.org/ort/
2•Tomte•51m ago•0 comments