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

Explaining, at some length, Techmeme's 20 years of consistency

https://news.techmeme.com/250912/20-years
3•nhf•5m ago•0 comments

Using Antigravity for Statistical Physics in JavaScript

https://christopherkrapu.com/blog/2025/antigravity-stat-mech/
1•ckrapu•6m ago•0 comments

Renewed push to preempt US state AI laws gains steam

https://iapp.org/news/a/renewed-push-to-preempt-us-state-ai-laws-gains-steam
1•walterbell•6m ago•0 comments

The Case of the Misread Historian: Thucydides and the Millennia of Mistake

https://medium.com/@gp2030/the-case-of-the-misread-historian-thucydides-and-the-millennia-of-mist...
1•light_triad•7m ago•0 comments

Amazon's Layoffs Are Business as Usual, Not Omens of AI Doom

https://jacobin.com/2025/11/amazon-layoffs-artificial-intelligence-h-1b-visa
1•wahnfrieden•9m ago•0 comments

Show HN: I made a Terminal UI for OpenSnitch, a Linux application firewall

https://github.com/amalbansode/opensnitch-tui
1•quadrophenia•11m ago•0 comments

The Zero-Bullshit Protocol – Hallucination-Proof AI Engineering System

https://gracefultc.gumroad.com/l/ctgyvz
1•Thugonerd•11m ago•0 comments

Show HN: I Built an Interactive Map to Compare Cost of Living by US County

https://watchpennies.com
1•lunava•14m ago•0 comments

How sea turtles learn locations using Earth’s magnetic field: research

https://uncnews.unc.edu/2025/02/13/sea-turtles-secret-gps-researchers-uncover-how-sea-turtles-lea...
1•hhs•16m ago•0 comments

Ruby 3.4.7 Port to Cosmopolitan Libc – Portable Ruby

https://github.com/igravious/cosmoruby/blob/feature/ruby-3.4.7-port/third_party/ruby-wip-3.4.7/RE...
1•Kerrick•18m ago•0 comments

What Is Alternative Upstract.com

https://allheadline.com/
1•fatbrother•20m ago•1 comments

Building an AI-native engineering team [pdf]

https://cdn.openai.com/business-guides-and-resources/building-an-ai-native-engineering-team.pdf
1•gmays•21m ago•0 comments

The Batman effect: The mere sight of the 'superhero' can make us more altruistic

https://phys.org/news/2025-11-batman-effect-mere-sight-superhero.html
1•brycehalley•23m ago•0 comments

This is a solar-powered website, which means it sometimes goes offline

https://solar.lowtechmagazine.com/power/
1•mikenew•24m ago•0 comments

Dell Ryzen 7 Laptop Bundle (32GB RAM, 1TB SSD) Is Almost 70% Off

https://kotaku.com/dell-ryzen-7-laptop-bundle-32gb-ram-1tb-ssd-is-almost-70-off-savings-youll-nev...
1•PaulHoule•27m ago•0 comments

VideoCore IV 3D Architecture Reference Guide

https://docs.broadcom.com/doc/12358545
3•doener•29m ago•0 comments

Intro to Apache DataFusion [video]

https://www.youtube.com/watch?v=3perqExFIRQ
2•teleforce•29m ago•0 comments

Mesa's V3D graphics driver stack

https://docs.mesa3d.org/drivers/v3d.html
1•doener•30m ago•0 comments

I learned Vulkan and wrote a small game engine with it

https://edw.is/learning-vulkan/
3•jakogut•31m ago•2 comments

Skyline, Strato, Vita3K and Yuzu Android Compatible Adreno Drivers

https://github.com/K11MCH1/AdrenoToolsDrivers
2•doener•33m ago•0 comments

China and Russia can detect F-35 (and B-2) using VHF radar

https://nationalinterest.org/blog/buzz/china-and-russia-can-detect-f-35-fighters-now
2•burnt-resistor•37m ago•4 comments

Matrix Core Programming on AMD CDNA3 and CDNA4 Architecture

https://rocm.blogs.amd.com/software-tools-optimization/matrix-cores-cdna/README.html
2•salykova•38m ago•0 comments

Apple's Problem with Bodies

https://drobinin.com/posts/apples-problem-with-bodies/
2•valzevul•43m ago•0 comments

Show HN: RSS/Atom Feed Summarizer

https://github.com/rcarmo/feed-summarizer
1•rcarmo•45m ago•0 comments

What Is Happening with Snowflake Stock

https://www.forbes.com/sites/greatspeculations/2025/11/21/what-is-happening-with-snowflake-stock/
1•teleforce•45m ago•0 comments

CDC to end monkey research programs

https://www.scientificamerican.com/article/cdc-to-end-monkey-research-program/
3•dmbche•47m ago•1 comments

Solve hard problems in complex codebases using AI Agents

https://www.humanlayer.dev/
1•jorzel•47m ago•0 comments

3D printing with unconventional vase mode

https://vorpal.se/posts/2025/jun/23/3d-printing-with-unconventional-vase-mode/
3•dgroshev•49m ago•1 comments

Agents Design Is Still Hard

https://lucumr.pocoo.org/2025/11/21/agents-are-hard/
2•jorzel•53m ago•0 comments

An 8 percent lifetime 'tax' is coming for students

https://www.washingtonpost.com/opinions/2025/11/18/education-reform-achievement-gap-income/
1•mhb•54m ago•1 comments