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

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•6mo ago
Agreed

World Energy Outlook 2025 – IEA

https://www.iea.org/reports/world-energy-outlook-2025
1•mpweiher•1m ago•0 comments

Shattering the Illusion: Maker Achieves Million-Step, Zero-Error LLM Reasoning

https://www.cognizant.com/us/en/ai-lab/blog/maker
1•dataminer•2m ago•0 comments

Building a robust permissions system in TypeScript

https://xetera.dev/article/typescript-permissions
1•todsacerdoti•3m ago•0 comments

The Verse Programming Language

https://dev.epicgames.com/documentation/en-us/fortnite/verse-language-reference?
1•azhenley•8m ago•0 comments

Astrophotographer snaps photo of skydiver 'falling' past the sun

https://www.livescience.com/space/the-sun/astrophotographer-snaps-absolutely-preposterous-photo-o...
1•sonicrocketman•9m ago•1 comments

Best Sports Game on the Internet

https://zengm.com/
1•marysminefnuf•15m ago•0 comments

Intro to Telegraphy

https://phreaknet.org/morse
1•vitalnodo•20m ago•0 comments

How to Like Everything More

https://sashachapin.substack.com/p/how-to-like-everything-more
1•eatitraw•21m ago•0 comments

Three astronauts are stuck on China's space station without a safe ride home

https://arstechnica.com/science/2025/11/three-astronauts-are-stuck-on-chinas-space-station-withou...
3•sipofwater•21m ago•0 comments

Stop Letting Websites Attack Your Brain: iPhone Hacks for Calm Browsing [video]

https://www.youtube.com/watch?v=upua-BTJ3Ps
1•muunbo•23m ago•1 comments

'Godfather of AI' (Bengio) becomes first person to hit one million citations

https://www.nature.com/articles/d41586-025-03681-6
1•dr_kiszonka•25m ago•1 comments

EV sales *still* have not fallen, cooled, slowed or slumped. Media is lying to u

https://electrek.co/2025/11/12/ev-sales-still-have-not-fallen-cooled-slowed-or-slumped-media-is-l...
2•xbmcuser•26m ago•0 comments

UFOs and Aliens in the News

1•sunscream89•27m ago•0 comments

Show HN: 1Pwned

https://github.com/peteski22/1Pwned
1•peteski22•28m ago•0 comments

libwifi: an 802.11 frame parsing and generation library written in C

https://libwifi.so/
2•vitalnodo•28m ago•0 comments

The new revolution on Internet. God Genesis

https://gist.github.com/strangevio
1•imthefirst•34m ago•2 comments

$1900 Bug Bounty to Fix the Lenovo Legion Pro 7 16IAX10H's Speakers on Linux

https://github.com/nadimkobeissi/16iax10h-linux-sound-saga
2•rany_•37m ago•0 comments

Multics and AS400:DPS8M on IBM PASE for I (OS/400) (2024)

https://dps8m.gitlab.io/blog/posts/20240207_DPS8M_AS400/
3•naves•38m ago•1 comments

The Bitter Lessons

https://www.hyperdimensional.co/p/the-bitter-lessons
2•kjhughes•38m ago•0 comments

IoT for Beginners

https://github.com/microsoft/IoT-For-Beginners
3•bakigul•40m ago•0 comments

The Engineering Behind the Falkirk Wheel [video]

https://www.youtube.com/watch?v=sq6ZOVbKQhY
2•gnoll_of_gozag•41m ago•0 comments

Ask HN: How Do Developers Stay Up to Date Without Being on Twitter All Day?

1•jerawaj740•41m ago•4 comments

AI for Beginners

https://github.com/microsoft/AI-For-Beginners
3•bakigul•42m ago•0 comments

Data Science for Beginners

https://github.com/microsoft/Data-Science-For-Beginners
1•bakigul•43m ago•0 comments

After years of false starts, this is what made consistency feel real

https://deep-work.app/
2•mzzlillieee•44m ago•0 comments

Saeros – A host-based intrusion detection system

https://github.com/Saeros-Security/Saeros
2•SaerosSecurity•45m ago•1 comments

Coordinated SSH Attacks: Moving Beyond Single IP Bans

https://godhani.me/coordinated-ssh-attacks-moving-beyond-single-ip-bans/
4•smokedcat•47m ago•0 comments

The First Portable Touchscreen – Casio If-8000 [video]

https://www.youtube.com/watch?v=Viosm9rqCn8
1•fortran77•53m ago•0 comments

Cadence Debuts System Chiplet Silicon to Accelerate Physical AI

https://www.forbes.com/sites/marcochiappetta/2025/11/13/cadence-debuts-its-first-system-chiplet-s...
1•transpute•53m ago•0 comments

My first book exceeded $10k in sales, so I'm giving it away again for -50%

https://kaelfairchild.gumroad.com/l/TheStrategicProductDesigner
2•akirahittoxyz•58m ago•0 comments