frontpage.
newsnewestaskshowjobs

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

Capacity planning with hyper local events

https://www.allevents.ai/blog/events-capacity-planning
1•bharatgel•45s ago•0 comments

Show HN: I evaluated file, vector, graph and RL based memory frameworks

https://www.pinglin.tw/blog/the-shapes-of-agent-memory
1•pinglin•1m ago•0 comments

Dwarkesh Patel's Podcast with Ryan Greenblatt

https://thezvi.substack.com/p/on-dwarkesh-patels-podcast-with-ryan
1•7777777phil•1m ago•0 comments

SlopScan: Displays a "slop score" when viewing public Git repositories

https://addons.mozilla.org/en-US/firefox/addon/slopscan/
1•birdculture•2m ago•0 comments

Printytron – Type it. 3D Print it

https://printytron.com
1•statenjason•2m ago•0 comments

Use Context.dev in a eve software factory

https://twitter.com/i/status/2088610340158476514
1•flashbrew•3m ago•0 comments

Open-source wallet SDK for AI agents

https://github.com/Squid-Pay/Squid-Agent-Wallet-SDK
1•horatiucode•5m ago•0 comments

High-Performance Optimistic Concurrency Cache

https://github.com/adanil-code/OptimisticCache
1•adanil_•10m ago•1 comments

U.S. to tell partners they must pick sides in AI race with China

https://www.japantimes.co.jp/business/2026/08/15/tech/us-ai-coalition-china-warning/
1•osivertsson•10m ago•0 comments

The most dangerous iPhone Game (beta)

https://testflight.apple.com/join/z1yM1vbj
1•guidouil•11m ago•0 comments

As speed cameras spread to more states, so does the backlash from drivers

https://www.npr.org/2026/08/14/nx-s1-5927506/speed-cameras-ticket-backlash
1•thehoff•11m ago•0 comments

The AI Situation in Software Development

https://srikanth.ch/posts/the-ai-situation/
1•srikanthdotch•12m ago•0 comments

Lamer

https://en.wikipedia.org/wiki/Lamer
2•ieie3366•12m ago•0 comments

Secondhand book sales are booming. Is it because of AI?

https://www.bbc.co.uk/news/articles/cp3rprx2wl4o
5•m-i-l•15m ago•0 comments

Model your business once – for humans and AI alike

https://klr-pattern.github.io/nexusx/
1•tank-34•16m ago•0 comments

Cloudflare's AI Psychosis

https://opensauce.it/cloudflare-ai-psychosis/
3•gregzeng95•16m ago•0 comments

ChainDrop worm crawls into NPM supply chain, evades standard defenses

https://www.theregister.com/security/2026/08/15/chaindrop-worm-crawls-into-npm-supply-chain-evade...
1•sbulaev•17m ago•0 comments

There Are over 1M NYC Street Signs

https://www.nytimes.com/2026/08/15/nyregion/nyc-street-sign-shop.html
2•donohoe•18m ago•1 comments

The First At-Home Test for Infected Ticks Could Improve Lyme Disease Diagnosis

https://www.smithsonianmag.com/innovation/the-first-at-home-test-for-infected-ticks-could-improve...
1•gmays•19m ago•0 comments

Atlantic Meridional Overturning Circulation

https://marine.copernicus.eu/explainers/phenomena-threats/atlantic-meridional-overturning-circula...
2•alexandrehtrb•23m ago•0 comments

Writergate: Zig I/O Interface Overhaul

https://alexrios.me/blog/writergate/
1•signa11•24m ago•0 comments

Your Estimate Isn't Off Because of Optimism or Inexperience

https://julienreszka.com/blog/your-estimate-isn-t-off-because-of-optimism-or-inexperience/
1•julienreszka•26m ago•1 comments

Splitting a Git Commit

https://blog.gnoack.org/post/git-history-split
3•signa11•28m ago•1 comments

Architectural Sins: Why We Keep Making Them and How We Can Stop

https://www.youtube.com/watch?v=P6fS9-HsZeI
1•aoma_conference•28m ago•0 comments

Show HN: Visually Precise AI Tutoring on iOS

https://useknowable.ai/
3•samuelzxu•31m ago•1 comments

Ask HN: When you sell your company, do you receive the money with a normal wire?

1•supergilbert•31m ago•1 comments

QuoteBench: Matched Scores Can Hide Command-Path Failures

https://arxiv.org/abs/2608.13547
2•ninadwrites•33m ago•0 comments

The Risk in the US-Japan Yen Rescue

https://www.youtube.com/watch?v=yh18YXKMk3g
2•tcp_handshaker•33m ago•0 comments

Show HN: Quasicrystals Animation Playground with WebXR

https://hypnagogic-quasicrystals.github.io/
2•r34•35m ago•0 comments

Why are we having so many (or so few) earthquakes?

https://www.usgs.gov/faqs/why-are-we-having-so-many-or-so-few-earthquakes-has-naturally-occurring...
2•jahnu•39m ago•1 comments