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

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•8mo ago
Agreed

Tracking a Button Click in Google Tag Manager Shouldn't Be This Hard

https://www.tagcompanion.com/blog/tracking-a-button-click-in-gtm-shouldn-t-be-this-hard/
1•ybor•2m ago•0 comments

Banning Syntax Highlighting Steroids

https://brainbaking.com/post/2026/01/banning-syntax-highlighting-steroids/
1•ingve•2m ago•0 comments

Galaxy 15

https://en.wikipedia.org/wiki/Galaxy_15
1•simonebrunozzi•3m ago•0 comments

Doom on Emacs

https://old.reddit.com/r/emacs/comments/1qtewez/doom_on_emacs/
1•internet_points•5m ago•0 comments

Same SQL, Different Results: A Subtle Oracle vs. PostgreSQL Migration Bug

https://databaserookies.wordpress.com/2026/01/30/same-sql-different-results-a-subtle-oracle-vs-po...
1•mahtodeepak•7m ago•0 comments

Where Tech Leaders and Students Think AI Is Going

https://www.wired.com/story/for-future-reference-ai-technology/
1•BerislavLopac•7m ago•0 comments

Show HN: PitchPilot – real time AI football-coach and Analytics

https://github.com/encr-ypted/ICHack2026
1•kaamuli•8m ago•0 comments

Lld 22 ELF Changes

https://maskray.me/blog/2026-02-01-lld-22-elf-changes
2•ingve•9m ago•0 comments

Nixie-clock using neon lamps as logic elements

https://www.pa3fwm.nl/projects/neonclock/
2•jacquesm•12m ago•0 comments

Capgemini to sell the biz that works for US gov. amid criticism of ICE contract

https://www.theregister.com/2026/02/02/capgemini_divests_us_federal_entity_cgs/
2•jjgreen•12m ago•1 comments

Show HN: OpenClaw Harness – Security firewall for AI coding agents (Rust)

https://github.com/sparkishy/openclaw-harness
2•devthecritical•15m ago•2 comments

Bro We Just Launched at Tiny Launch Click Here to Upvote

https://www.tinylaunch.com/launch/9265
2•mailient•15m ago•0 comments

Propositions about the New Romanticism

https://www.honest-broker.com/p/25-propositions-about-the-new-romanticism
3•bryanrasmussen•16m ago•0 comments

US Data Center Buildout Tracker

https://www.datacenter.fyi/
2•stevenzzzzzzz•18m ago•0 comments

RMA – Fast Rust monorepo scanner cross-file taint, typestate, <0.5s on 100k LOC

https://github.com/bumahkib7/rust-monorepo-analyzer
2•bumahkib7•18m ago•1 comments

Show HN: EasyClaw – Seamless Installation for OpenClaw

https://easyclaw.com
2•tifa2up•20m ago•0 comments

Show HN: What Time Was It? – See what time it was X hours/minutes ago

https://whattimewasit.app/
2•brianchanwh•21m ago•0 comments

Why "No-Code Google Tag Manager Alternatives" Fail Marketers in the Long Run

https://www.tagcompanion.com/blog/why-no-code-gtm-alternatives-fail-marketers-in-the-long-run/
2•ybor•22m ago•0 comments

A simple CLI tool to be more organized and productive in 2026

https://github.com/inevolin/in-cli
2•ilja-nevo•23m ago•1 comments

Should makers still care about code quality?

https://hermanschaaf.com/should-makers-care-about-code-quality/
3•jeffbobries•26m ago•2 comments

The iPhone Triple Zero Meltdown

https://www.dodgycoder.net/2026/02/the-iphone-triple-zero-meltdown.html
2•damian2000•27m ago•0 comments

Show HN: Sklad – Secure, offline-first snippet manager (Rust, Tauri v2)

https://github.com/Rench321/sklad
2•rench321•28m ago•0 comments

Show HN: Map Frame – Custom map posters for $1 (not $50)

https://www.map-frame.com
2•sylvester_aswin•29m ago•0 comments

Credo Ut Intelligam

https://en.wikipedia.org/wiki/Credo_ut_intelligam
2•rzk•32m ago•0 comments

Kyutai unveils Invincible Voice: AI in the service of human connection

https://www.iliad.fr/en/actualites/article/kyutai-unveils-invincible-voice-artificial-intelligenc...
2•JeanKage•35m ago•0 comments

What Most People Miss About Getting Promoted – By Yue Zhao

https://news.theuncommonexecutive.com/p/what-most-people-miss-about-getting
3•yuezhao•36m ago•1 comments

Ask HN: Why do users mute apps instead of deleting them?

2•kajolshah_bt•38m ago•2 comments

Purely Functional Games (2018)

https://soupi.github.io/rfc/pfgames/
2•todsacerdoti•38m ago•0 comments

Less transparency does not protect critical infrastructure

https://www.dvlp.energy/en/blog/kritis
2•protontypes•44m ago•0 comments

Bridging Secrets Is Hard

https://www.johndcook.com/blog/2026/01/30/bridging-secrets/
2•ibobev•46m ago•0 comments