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

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•10mo ago
Agreed

Who Will Command the Robot Armies? (2016)

https://idlewords.com/talks/robot_armies.htm
1•diafygi•2m ago•1 comments

Global trade will continue, but will become more complex

https://www.economist.com/the-world-ahead/2025/11/12/global-trade-will-continue-but-will-become-m...
1•andsoitis•2m ago•0 comments

You're right, no one can tell if C++ is AI generated

https://mropert.github.io/2026/03/30/ai_garbage_cpp/
1•signa11•4m ago•0 comments

Hungary colluded with Russia to delist sanctioned oligarchs, companies and banks

https://theins.org/en/inv/290911
1•vrganj•5m ago•0 comments

Leaked Calls Expose Hungary and Slovakia as Secret Kremlin Backchannel Inside EU

https://united24media.com/latest-news/leaked-calls-expose-hungary-and-slovakia-as-secret-kremlin-...
1•reimertz•7m ago•0 comments

Meat Consumption and Cognitive Health by APOE Genotype (Alzheimer Disease Risk)

https://jamanetwork.com/journals/jamanetworkopen/fullarticle/2846712
1•raffael_de•7m ago•1 comments

China builds open RISC-V chip platform with Xiangshan, Ruyi OS

https://www.digitimes.com/news/a20260330VL206/risc-v-development-ip-processor.html
1•maxloh•8m ago•0 comments

Porting Go's io package to C

https://antonz.org/porting-go-io/
1•blenderob•8m ago•0 comments

Show HN: LynxDB – Log analytics in a single Go binary

https://github.com/lynxbase/lynxdb
1•owen-orlov•9m ago•0 comments

Claude Code has a Tamagotchi and a dream engine

https://gist.github.com/Houstoten/144e4ae9c520a281551d0cb92c488e04
1•deep_noz•10m ago•0 comments

Removing "to be" from an LLM's vocabulary changes how it reasons (I have data)

https://arxiv.org/abs/2603.27626
1•rodspeed•11m ago•1 comments

OLAP Is All You Need: How We Built Reddit's Logging Platform

https://old.reddit.com/r/RedditEng/comments/1rpbk7u/olap_is_all_you_need_how_we_built_reddits_log...
1•mooreds•12m ago•0 comments

Quadratic gravity theory reshapes quantum view of Big Bang

https://phys.org/news/2026-03-quadratic-gravity-theory-reshapes-quantum.html
2•jnord•13m ago•0 comments

Lincity for Amiga 68k

https://paulthetall.itch.io/lincity-for-68k-amiga
1•doener•13m ago•0 comments

A Cat-and-Mouse Game of Russian Internet Restrictions and Evasion

https://www.nytimes.com/2026/03/31/world/europe/russia-internet-restrictions.html
1•cainxinth•13m ago•0 comments

Show HN: A curated guide to everything on go.dev, organized for learners

https://github.com/tamnd/godev-index
1•tamnd•14m ago•0 comments

Fermi shares plunge 13% on $486M net loss

https://www.ft.com/content/49a8b5c8-d655-4eb8-b0dc-6bd403860925
1•mooreds•14m ago•0 comments

Where are the German self-driving cars?

https://realimaginedprogress.substack.com/p/german-carmakers-have-surrendered
2•dostick•17m ago•0 comments

He Helped Stop Iran from Getting the Bomb

https://www.newyorker.com/magazine/2026/04/06/he-helped-stop-iran-from-getting-the-bomb
1•tzury•17m ago•0 comments

Blockchain solves what happens to your data after death.:?;? –:.?

https://daycade.com
1•Martin_Dev_SaaS•17m ago•1 comments

Agile teams don't use a lot of data in their retrospectives

https://chuniversiteit.nl/papers/data-in-retrospectives
1•ibobev•18m ago•0 comments

Boyer-Moore Majority Element

https://buttondown.com/jaffray/archive/boyer-moore-majority-element/
1•ibobev•18m ago•0 comments

Walking backwards into the future – A look at descriptor heap in Granite

https://themaister.net/blog/2026/03/29/walking-backwards-into-the-future-a-look-at-descriptor-hea...
1•ibobev•19m ago•0 comments

The Secret Minicomputer Inside Your Sphere. The Origins of Sphere Basic

https://sphere.computer/news/2026-03-28-the-secret-minicomputer-inside-your-sphere.html
1•oldnetguy•19m ago•0 comments

Battery Booster Strategy

https://www.eesc.europa.eu/en/our-work/opinions-information-reports/opinions/battery-booster-stra...
1•doener•20m ago•0 comments

Presenting Unlicense Open Source Code Like a Pokemon Gym Badge Holder

https://cochranblock.org/codeskillz
1•cochranblock•21m ago•0 comments

SSRF → AWS IMDS: stealing EC2 IAM credentials with 3 HTTP requests

https://paolocostanzo.github.io/ssrf-imds-ec2-credentials/
1•PCostanzo•22m ago•0 comments

How I setup my Hetzner server with Coolify, Tailscale, UFW, and Cloudflare

https://ben.cates.fm/securing-coolify-with-tailscale-ufw-cloudflare/
2•benja123•22m ago•1 comments

Prediction: The Shopify CEO's Pull Request Will Never Be Merged nor Closed

https://joshmoody.org/blog/shopify-ceo-autoresearch-pr/
3•birdculture•23m ago•0 comments

Has Something Changed in the Near-Earth Meteoroid Environment?

https://www.amsmeteors.org/2026/03/has-something-changed-in-the-near-earth-meteoroid-environment/
1•Luc•29m ago•0 comments