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

Obsidian stores notes privately on your device

https://obsidian.md/
1•doener•1m ago•0 comments

Show HN: The Hanoi Tree

https://avl-games.com/
1•berardino•2m ago•0 comments

Trump pushes UN 'free speech' declaration in veiled attack on EU tech regulation

https://www.politico.eu/article/trump-administration-will-push-un-free-speech-declaration-that-ta...
1•thm•5m ago•0 comments

Make every row and column a group of three

https://sixfold.pwheslop.com
1•michaelbrooks•7m ago•1 comments

Java was a three-day hotfix away from dying horribly on stage

https://www.theregister.com/devops/2026/07/18/java-was-a-three-day-hotfix-away-from-dying-horribl...
1•beardyw•8m ago•0 comments

Write with Maximum Effort

https://petegleeson.com/blog/write-with-maximum-effort/
2•petegleeson•16m ago•0 comments

GEMM Performance Measurement Methodology Guidelines

https://docs.nvidia.com/cutlass/latest/media/docs/cpp/gemm_performance_measurement_methodology_gu...
1•matt_d•19m ago•0 comments

Faster Algorithms for Structured Matrix Multiplication via Flip Graph Search

https://dl.acm.org/doi/10.1145/3815436.3815455
1•matt_d•21m ago•0 comments

International Math Olympiad 2026 Results

https://www.imo2026.com/Results/Individual_Results.htm
1•pykello•22m ago•0 comments

I'm Done with Mullvad

https://moonwriting.blog/i-m-done-with-mullvad
2•lylo•26m ago•0 comments

Vibecoded Scheme Implementation

https://kaappi-lang.org/
1•baijum•27m ago•0 comments

Nolan's Odyssey – A technical analysis by a nitpicky Classics student

https://earlrambles.pagecord.com/nolans-odyssey-a-very-technical-analysis-by-a-very-nitpicky-clas...
2•lylo•27m ago•0 comments

Show HN: Fluxnation, the Fastest FLUX.1 Execution Kernel

https://github.com/ULT7RA/FLUXNATION
1•KnoxProtocol•29m ago•0 comments

Taking OCaml and Eio for a Spin

https://mattjhall.co.uk/posts/taking-ocaml-eio-for-a-spin.html
1•mattjhall•31m ago•0 comments

The Java Story | Official Documentary

https://www.youtube.com/watch?v=ZqGSg4b_cZA
2•doppp•31m ago•0 comments

Distro Fighter – web browser game

https://distrofighter.com/
1•ashitlerferad•32m ago•0 comments

Swedbank fined $50M by New York authorities over Panama Papers revelations

https://www.icij.org/investigations/panama-papers/swedbank-fined-50-million-by-new-york-authoriti...
1•robtherobber•34m ago•0 comments

Show HN: Tool to help old Java projects not on modern build systems

https://maven-tools.mohants.com/
1•pmg1991•35m ago•0 comments

Show HN: GeoChess – open-source geography strategy game

https://geochess.org
2•spider-hand•36m ago•1 comments

How much of your workweek goes the way you expected? [pdf]

https://www.microsoft.com/en-us/research/wp-content/uploads/2024/11/Time-Warp-Developer-Productiv...
1•akarshhegde18•37m ago•0 comments

The M5Stack Tab5

https://taoofmac.com/space/reviews/2026/07/18/1920
1•rcarmo•42m ago•0 comments

Ask HN: Are there any new competitors to Google search in 2026?

2•roschdal•49m ago•2 comments

EU Exempts Apple Watch and AirPods from Battery Removal Requirements

https://mjtsai.com/blog/2026/07/17/eu-exempts-apple-watch-and-airpods-from-battery-removal-requir...
5•miohtama•53m ago•2 comments

AI Watermark Evidence Fails Forensic Readiness: An Empirical Evaluation

https://arxiv.org/abs/2607.16010
1•sbulaev•57m ago•0 comments

A Lunch Conversation Changed My Website

https://ammar-najjar.com/blog/rebuilding-website-astro/
1•ammarnajjar•58m ago•0 comments

Is there even a ground-truth for LLMs' internal representations?

https://www.lesswrong.com/posts/EetjXEwjR2eun2mAc/is-there-even-a-ground-truth-for-llms-internal
2•joozio•1h ago•0 comments

PixelSat I Software Part 3: Onboard Computer

https://www.projectpixelorbital.com/software-3/
1•aadishv•1h ago•0 comments

I compared 5 AI coding subscriptions by pricing model and usage limits

https://canopywave.com/blog/best-ai-coding-plans-2026-pricing-limits-use-cases
2•Rossmax•1h ago•0 comments

Britain: A Cautionary Tale for America

https://www.noahpinion.blog/p/the-uk-is-a-cautionary-tale-for-the
5•barry-cotter•1h ago•1 comments

Claude Fable 5 on your plan

https://support.claude.com/en/articles/15424964-claude-fable-5-on-your-plan
5•tidbeck•1h ago•1 comments