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

I built a local TypeScript guardrail for AI agent cost failures

https://github.com/salimassili62-afk/ai-costguard
1•salim2006•2m ago•0 comments

Beyond Dexterity: Why Contact May Define the Next Era of Robotics

https://spectrum.ieee.org/agilink-contact-intelligence-robot-manipulation
1•Brajeshwar•3m ago•0 comments

Apple's New AI Models Contain 'None' of Google's Gemini Assistant

https://www.macrumors.com/2026/06/09/apples-new-ai-contains-no-gemini/
1•bound008•3m ago•0 comments

React Native Windows v0.83 is here

https://devblogs.microsoft.com/react-native/%f0%9f%9a%80react-native-windows-v0-83-is-here/
2•soheilpro•5m ago•0 comments

Two Types of Bureaucracy: Enabling and Coercive

https://lozeve.com/posts/types-of-bureaucracy-enabling-and-coercive
1•mooreds•5m ago•0 comments

An open-source tool helping cities, states, and regions understand climate risks

https://cdp-action-explorer.net/
1•mooreds•5m ago•0 comments

Why are we still arguing about the industrial revolution?

https://www.ft.com/content/f8379b23-f029-4274-b508-5452d965ad28
1•mmarian•7m ago•1 comments

What about OpenCL and CUDA C++ alternatives?

https://www.modular.com/blog/democratizing-ai-compute-part-5-what-about-cuda-c-alternatives
2•eatonphil•10m ago•0 comments

Kahan Summation Algorithm

https://en.wikipedia.org/wiki/Kahan_summation_algorithm
2•tosh•13m ago•0 comments

AAuth Protocol

https://datatracker.ietf.org/doc/draft-hardt-oauth-aauth-protocol/
1•mooreds•14m ago•0 comments

Loop Engineering

https://addyosmani.com/blog/loop-engineering/
1•vinhnx•15m ago•0 comments

TokkeyCC – OpenAI-compatible API for 100 AI models, $0.22 per 1M tokens

https://tokkeycc.com
1•wangyixiang•16m ago•0 comments

Show HN: Local-first history, search, and analytics for Claude Code and Codex

https://github.com/sudomichael/agentgraphed
1•ushercakes•16m ago•0 comments

Start Small: The key to successful software projects

https://keystonebit.com/blog/start-small
1•gatinsama•16m ago•0 comments

Google patches new Chrome zero-day flaw exploited in the wild

https://www.bleepingcomputer.com/news/security/google-patches-fifth-chrome-zero-day-bug-exploited...
2•Brajeshwar•17m ago•0 comments

Everything You Wanted to Know About a Kids' Social Media Ban

https://www.michaelgeist.ca/2026/06/everything-you-wanted-to-know-about-a-kids-social-media-ban-b...
2•goalieca•18m ago•0 comments

Deep Work Timer

https://www.deepworkdepot.com/
1•jimsojim•18m ago•0 comments

Why are people pumping their bodies with fat from corpses?

https://www.theguardian.com/commentisfree/2026/apr/26/alloclae-cadaver-fat-filler
1•PaulHoule•19m ago•1 comments

Nango runs untrusted customer code at scale

https://nango.dev/blog/how-nango-runs-untrusted-customer-code-at-scale/
2•rguldener•20m ago•0 comments

Fabrice Bellard's Home Page

https://bellard.org/
2•janisz•20m ago•0 comments

Judge Learns Both Sides Used AI, Cancels Trial, Kicks Everyone Off the Case

https://www.404media.co/judge-learns-lawyers-on-both-sides-of-case-used-ai-cancels-trial-kicks-ev...
7•arto•21m ago•0 comments

Scissors vs. Swiping: The Hidden Cost of Touchscreens and How Designers Can Help

https://caseorganic.substack.com/p/when-swiping-supplants-scissors
1•SLHamlet•21m ago•0 comments

Universities Expand R&D Efforts in GAN, Sic, GaO

https://marklapedus.substack.com/p/universities-expand-r-and-d-efforts
2•ChipNode•23m ago•0 comments

Latest In Lithography: JSR up for sale?; FEL; forecasts–chips, memory, EUV

https://marklapedus.substack.com/p/the-latest-news-in-lithography-2ef
3•ChipNode•25m ago•0 comments

Show HN: ChromiumFish – Open-source fingerprint-hardened Browser for Scraping

https://github.com/arman-bd/chromiumfish
6•armanified•25m ago•1 comments

Show HN: Proquiro – Land acquisition software for Indian real estate teams

https://proquiro.com
3•nvignesh•25m ago•0 comments

Show HN: Terra – Off-market real estate sourcing, with research and AI modelling

https://terraconsole.com
2•vampiregrey•27m ago•0 comments

Or Equivalent Experience: Lazy Mistakes in Hiring and the Truth Behind Jobs Data

https://substack.norabble.com/p/or-equivalent-experience
2•nedruod•29m ago•0 comments

FCC Wants to Kill Burner Phones by Forcing Telecoms to Get All Customers' IDs

https://www.404media.co/fcc-wants-to-kill-burner-phones-by-forcing-telecoms-to-get-all-customers-...
9•berlianta•29m ago•5 comments

Malicious PyPI Wheels Target Bioinformatics and MCP Developers

https://socket.dev/blog/mini-shai-hulud-miasma-and-hades-worms-target-bioinformatics-and-mcp-deve...
2•fbuilesv•30m ago•0 comments