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

Go is faster than Swift

https://programming-language-benchmarks.vercel.app/swift-vs-go
1•behnamoh•2m ago•0 comments

Microsoft is working to rebuild trust in Windows

https://www.theverge.com/tech/870045/microsoft-windows-11-issues-rebuilding-trust-notepad
1•JamesAdir•5m ago•0 comments

Top engineers at Anthropic, OpenAI say AI now writes 100% of their code

https://fortune.com/2026/01/29/100-percent-of-code-at-anthropic-and-openai-is-now-ai-written-bori...
1•PessimalDecimal•5m ago•0 comments

Hedge funds' correlation with stocks sparks fears over lack of crash protection

https://www.ft.com/content/8c1d9cfe-1d8f-45d5-9ab1-57fb203a170c
2•petethomas•7m ago•0 comments

Week 3: EE 292P Transistor Physics with Mark Lundstrom (Purdue)

https://hnvr.medium.com/week-3-ee-292p-atoms-bits-and-the-national-interest-the-semiconductor-tec...
1•malchow•9m ago•0 comments

Nerd Fonts

https://www.nerdfonts.com
2•jonbaer•9m ago•0 comments

Agent-Session-Commit

https://github.com/Olshansk/agent-session-commit
1•Olshansky•12m ago•0 comments

Spotify's Crackdown on Anna's Archive Domains Hits a Jurisdiction Snag

https://torrentfreak.com/spotifys-crackdown-on-annas-archive-domains-hits-a-jurisdiction-snag/
1•pabs3•12m ago•0 comments

Template Parameter Deduction: Eliminating Hidden Copies in Generic Code

https://0xghost.dev/blog/template-parameter-deduction/
1•PaulHoule•13m ago•0 comments

OpenClaw – Moltbot Renamed Again

https://openclaw.ai/blog/introducing-openclaw
1•ed•15m ago•0 comments

Show HN: A small reference demo for separating UI stalls from network delays

https://deterministic-stream-demo1.pages.dev/
1•Slaine•15m ago•1 comments

Show HN: JSON dataset of 1,100 trending AI image prompts from X

https://github.com/jau123/nanobanana-trending-prompts
1•jaujaujau•18m ago•1 comments

Fact-checking: Tasks that are hard for humans are easy for AI and vice versa?

https://www.normaltech.ai/p/fact-checking-moravecs-paradox
1•swolpers•23m ago•0 comments

Show HN: Apple Activity Rings, but for Anything

https://orbit-rings.netlify.app
1•abaymado•24m ago•0 comments

When deep reinforcement learning meet trading

https://github.com/zero-was-here/tradingbot
1•solosquad•28m ago•1 comments

Show HN: redb-turbo: redb with page-level compression and encryption

https://github.com/russellromney/redb-turbo
1•russellthehippo•30m ago•0 comments

Show HN: ÆTHRA – Writing Music as Code

2•CzaxTanmay•30m ago•0 comments

Show HN: I made a dev tool that helps vibecoders to AVOID security issues

https://vibeshield.tech/
1•chockslam•31m ago•0 comments

Can AI companies become profitable?

https://epoch.ai/gradient-updates/can-ai-companies-become-profitable
2•signa11•33m ago•0 comments

Do markets make us moral?

https://www.ft.com/content/3c332044-69ca-490a-b710-47c312e1191c
1•paulpauper•33m ago•0 comments

Heritability of intrinsic human life span is about 50% when confounding factors

https://www.science.org/doi/10.1126/science.adz1187
1•paulpauper•34m ago•0 comments

Show HN: I built VanCamera: FOSS, secure, zero-config Android webcam for Windows

https://github.com/danielbolivar/vancamera
9•danielb74•40m ago•1 comments

Rust and Swift

https://v4.chriskrycho.com/rust-and-swift.html
4•behnamoh•42m ago•0 comments

Slk – Slack CLI for non-human

https://github.com/kehao95/slack-agent-cli
1•kehao95•44m ago•0 comments

Microsoft sheds $360B in market value as AI spending spooks investors

https://www.ft.com/content/c7e23f07-70b3-43a7-8e1d-040ca93d6d90
1•geoffbp•47m ago•1 comments

Peter J. Weinberger's Face

https://spinroot.com/pico/pjw.html
2•jumpocelot•49m ago•0 comments

How did this top student become homeless [video]

https://www.youtube.com/watch?v=asSpaaQvrbk
2•teleforce•49m ago•0 comments

US threatens to 'decertify' Canadian aircraft as rift with Ottawa deepens

https://www.ft.com/content/4c3331b9-3c83-4292-a5b8-86b4d62ebf69
3•petethomas•55m ago•0 comments

Claude Agent Skills: A First Principles Deep Dive (2025)

https://leehanchung.github.io/blogs/2025/10/26/claude-skills-deep-dive/
3•dnw•59m ago•0 comments

ASIC Design Jobs

https://www.semidesignjobs.com/s/asic-design-jobs
1•johncole•1h ago•0 comments