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

Building on ATProto

https://lukekanies.com/writing/building-on-atproto/
2•speckx•1m ago•0 comments

Snappable nRF52820 debugger integrated into nRF54L15 development board

https://www.cnx-software.com/2026/07/23/icy-electronics-nrf54l15-discovery-devboard-integrates-a-...
1•whiteblossom•2m ago•0 comments

Engineer Away the Slop

https://ghuntley.com/slop/
2•hasheddan•2m ago•0 comments

I used to ignore prediction markets. Then I learned people bet on wildfires

https://www.hcn.org/articles/i-used-to-ignore-prediction-markets-then-i-learned-people-were-betti...
1•cdrnsf•3m ago•0 comments

Why does DOS include "get interrupt vector" and "set interrupt vector" syscalls?

https://retrocomputing.stackexchange.com/questions/32747/why-does-dos-include-get-interrupt-vecto...
2•SeenNotHeard•5m ago•0 comments

The Topology of Depression: A System Dynamics View of My Depression and Recovery

https://tomatovillain.substack.com/p/the-topology-of-depression
1•tom-villani•6m ago•0 comments

Microsoft 365 a.k.a. Microsoft Copilot a.k.a. Office 365 has jumped off a cliff

https://cyberplace.social/@GossiTheDog/116970532818392929
1•d1ss0nanz•6m ago•0 comments

Model Context Protocol prepares to break with its stateful past

https://www.theregister.com/devops/2026/07/23/model-context-protocol-prepares-to-break-with-its-s...
1•rndsignals•7m ago•0 comments

My coding font and how I made it

https://github.com/ericfortis/camelana
1•efortis•8m ago•0 comments

AMD's 256-core Epyc 9996 'Venice' claims up to a 3.4x jump over Intel Xeon

https://www.tomshardware.com/pc-components/cpus/amds-256-core-epyc-9996-venice-claims-up-to-a-3-4...
2•rndsignals•8m ago•0 comments

SafeMediaKit – blur/report UI for Apple's on-device nudity detection

https://github.com/SardorbekR/SafeMediaKit
1•sardor_rakhimov•11m ago•0 comments

I built a tool that tells who tried your startup idea, and how they died

https://dejaview.bsct.so/
3•aminkhorrami•11m ago•1 comments

Open Trading Surface

https://pauljbernard.github.io/open-trading-surface/
1•paulbernard•12m ago•0 comments

Private Credit Ditches 'Semi-Liquid' Term After Redemption Wave

https://www.bloomberg.com/news/articles/2026-07-23/private-credit-ditches-semi-liquid-term-after-...
1•petethomas•12m ago•0 comments

A solid-state "atomic channel" for separating rare earth elements

https://pme.uchicago.edu/news-events/news/cleaner-route-purifying-rare-earth-elements
2•MarcoDewey•12m ago•0 comments

Geekbench 7

https://www.geekbench.com/blog/2026/07/geekbench-7/
2•ilreb•13m ago•1 comments

Smoother scrolling: How we halved scroll jank in Chrome on Android

https://blog.google/chromium/smoother-scrolling-how-we-halved-scroll-jank-in-chrome-on-android/
1•xnx•15m ago•1 comments

Importing a front end JavaScript library without a build system

https://simonwillison.net/2024/Nov/23/without-a-build-system/
1•ulrischa•15m ago•0 comments

Why Sony Can't Bring Back Its Classic Walkman Models

https://obsoletesony.substack.com/p/why-sony-cant-bring-back-classic-walkman
5•speckx•17m ago•1 comments

Storage Price Trends

https://pcpartpicker.com/trends/price/internal-hard-drive/
1•kaycebasques•17m ago•0 comments

Space's Hardest Problems: Incentives, Information, and Institutions

https://finalfrontierecon.substack.com/p/spaces-hardest-problems-incentives
1•paulpauper•17m ago•0 comments

AI bet goes awry: Oracle fires 21,000 employees

https://www.msn.com/en-us/money/economy/ai-bet-goes-awry-oracle-fires-21-000-employees/ar-AA28vWuD
1•petethomas•17m ago•0 comments

Does it matter if you don't like the characters?

https://www.commonreader.co.uk/p/does-it-matter-if-you-dont-like-the
1•paulpauper•18m ago•0 comments

IT Inflation Is Rising. It's Time for the C-Suite to Act

https://www.hellersearch.com/blog/it-inflation-is-rising.-its-time-for-the-c-suite-to-act
1•petethomas•19m ago•0 comments

A new crop of treasure-seekers are betting it all on the Calif. desert

https://www.sfgate.com/california/article/california-gold-mining-22335840.php
1•gmays•20m ago•0 comments

EU's Google fine risks triggering Trump as he gears up for more tariffs

https://www.politico.eu/article/eu-google-fine-donald-trump-tariffs/
1•oriettaxx•21m ago•0 comments

Poison Song Teaser (2025)

https://www.tamriel-rebuilt.org/content/poison-song-teaser
1•kqr•22m ago•0 comments

Puffling spotted at colony in 'danger of extinction'

https://www.bbc.com/news/articles/cx2rv02dky2o
1•paulpauper•23m ago•0 comments

Claude Opus 5

https://artificialanalysis.ai/models/claude-opus-5
2•pranshuchittora•24m ago•1 comments

FDA panel votes to place popular peptide BPC-157 on compounding list

https://www.reuters.com/business/healthcare-pharmaceuticals/fda-panel-votes-place-popular-peptide...
1•brandonb•24m ago•0 comments