frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: What should be included in a standard library?

5•vodou•6mo ago
I know, I know... There are countless "it depends" baked into this question. But let’s try anyway.

After reading HN for years, I have encountered so many opinions regarding standard libraries in various programming languages, e.g., how they should be designed, what they should (and should not) include, etc.

The C standard library is very minimal, focusing mostly on low-level facilities. Everyone is expected to implement their own dynamic arrays or choose one implementation from a zillion available libraries. And, apparently, null-terminated strings are the work of the devil. C++ has a much more extensive standard library, built around generic programming techniques using containers, iterators, and algorithms applied in a composable way. It is rather elegant and powerful, but not very intuitive for beginners. It also has some notable omissions compared to more modern languages. Python comes with "batteries included" in the form of a very rich standard library. However, the PSF tends to "break user space" from time to time by deprecating older modules, such as “boring” technologies like CGI or modules with known security problems. (I am not comfortable enough to say anything about JS, Go, Rust, etc.)

So, what would a great standard library look like? What would make you happy? What have we learned about this after 50+ years of computing? Do you want everything from linked lists to red-black trees (and beyond)? Graphics and sound? (Even if no single API can please everyone.) XML? YAML? SIMD abstractions? Where do you even stop without causing anger? Where do you begin?

(No, I am not creating a new programming language. Enough is enough.)

Comments

rickcarlino•6mo ago
I love this question.

HTTP server and related parsers (just a basic one), URL parsing and escaping, JSON, Socket handling, timers, interactive debugger, basic templating library, WebSocket client, SQLite.

I think Ruby got it right in this regard and Bun comes close as a second place.

bjourne•6mo ago
Like Wikipedia tries to catalogue all useful knowledge in the world, a standard library should catalogue all useful modules in the world. The problem is that tools and community structures we have are not advanced enough to support that workflow yet. E.g., it's difficult to see how you could put PyTorch into Python's standard library and have all developers happy with that. But it would make a lot of "meta" issues easier, such as release management, consistent documentation, community relations, etc.
moomoo11•6mo ago
Go has a nice std, and interfaces that make it easy to add on top instead of reinventing the wheel.

I think as long as a language offers the basics (like streams, etc) it’s not that bad to build on top of it.

mikewarot•6mo ago
If you can possibly include the "magic" strings that Free Pascal has, you'll be light years ahead of just plain C strings. They're counted, reference counted, and copy on modify. You don't have to allocate/free them, and they can contain gigabytes of ASCII, Unicode, or Binary data.
bruce511•6mo ago
I like to think of this as a analogy to biology. Consider this question in the context of say DNA. What DNA strands should be present in the "standard library".

In practice there's no right answer to this - I mean sad library for plants? Animals? Fungi? The question quickly becomes meaningless because without a lot more context there's no right answer.

In the scope of language - is this for embedded programs? Desktops? Phones? Is it for system components? Is it going to talk to hardware? Or networks? Is it headless or heavy UI? What OS is it running on? Is it for writing CRUD apps? Or games? Will it be used in space?

Every context brings different trade offs. Different boundaries, different resources, different everything.

Thus every answer to your question is both true for some places, and false in others.

Thus variety in context is what leads us to the current situation- lots of options.

dapperdrake•6mo ago
The C standard library is hamstrung by undefined behaviour versus implementation defined behaviour. This kills all attempts at offering reliable overflow-checks.

The biggest fulcrum is: Can developers also build a complete copy of the standard library or must you be a language implementor? This is what killed Elm. And both Java and Clojure survived. Even a tool like a debugger can be added to the hotspot VM by developers as opposed to just language implementors. Yes, there are many details, but it isn’t precluded on principle.

Show HN: Empusa – Visual debugger to catch and resume AI agent retry loops

https://github.com/justin55afdfdsf5ds45f4ds5f45ds4/EmpusaAI
1•justinlord•2m ago•0 comments

Show HN: Bitcoin wallet on NXP SE050 secure element, Tor-only open source

https://github.com/0xdeadbeefnetwork/sigil-web
2•sickthecat•4m ago•0 comments

White House Explores Opening Antitrust Probe on Homebuilders

https://www.bloomberg.com/news/articles/2026-02-06/white-house-explores-opening-antitrust-probe-i...
1•petethomas•4m ago•0 comments

Show HN: MindDraft – AI task app with smart actions and auto expense tracking

https://minddraft.ai
2•imthepk•9m ago•0 comments

How do you estimate AI app development costs accurately?

1•insights123•10m ago•0 comments

Going Through Snowden Documents, Part 5

https://libroot.org/posts/going-through-snowden-documents-part-5/
1•goto1•11m ago•0 comments

Show HN: MCP Server for TradeStation

https://github.com/theelderwand/tradestation-mcp
1•theelderwand•14m ago•0 comments

Canada unveils auto industry plan in latest pivot away from US

https://www.bbc.com/news/articles/cvgd2j80klmo
2•breve•15m ago•0 comments

The essential Reinhold Niebuhr: selected essays and addresses

https://archive.org/details/essentialreinhol0000nieb
1•baxtr•17m ago•0 comments

Rentahuman.ai Turns Humans into On-Demand Labor for AI Agents

https://www.forbes.com/sites/ronschmelzer/2026/02/05/when-ai-agents-start-hiring-humans-rentahuma...
1•tempodox•19m ago•0 comments

StovexGlobal – Compliance Gaps to Note

1•ReviewShield•22m ago•1 comments

Show HN: Afelyon – Turns Jira tickets into production-ready PRs (multi-repo)

https://afelyon.com/
1•AbduNebu•23m ago•0 comments

Trump says America should move on from Epstein – it may not be that easy

https://www.bbc.com/news/articles/cy4gj71z0m0o
5•tempodox•24m ago•2 comments

Tiny Clippy – A native Office Assistant built in Rust and egui

https://github.com/salva-imm/tiny-clippy
1•salvadorda656•28m ago•0 comments

LegalArgumentException: From Courtrooms to Clojure – Sen [video]

https://www.youtube.com/watch?v=cmMQbsOTX-o
1•adityaathalye•31m ago•0 comments

US moves to deport 5-year-old detained in Minnesota

https://www.reuters.com/legal/government/us-moves-deport-5-year-old-detained-minnesota-2026-02-06/
5•petethomas•34m ago•2 comments

If you lose your passport in Austria, head for McDonald's Golden Arches

https://www.cbsnews.com/news/us-embassy-mcdonalds-restaurants-austria-hotline-americans-consular-...
1•thunderbong•39m ago•0 comments

Show HN: Mermaid Formatter – CLI and library to auto-format Mermaid diagrams

https://github.com/chenyanchen/mermaid-formatter
1•astm•54m ago•0 comments

RFCs vs. READMEs: The Evolution of Protocols

https://h3manth.com/scribe/rfcs-vs-readmes/
2•init0•1h ago•1 comments

Kanchipuram Saris and Thinking Machines

https://altermag.com/articles/kanchipuram-saris-and-thinking-machines
1•trojanalert•1h ago•0 comments

Chinese chemical supplier causes global baby formula recall

https://www.reuters.com/business/healthcare-pharmaceuticals/nestle-widens-french-infant-formula-r...
2•fkdk•1h ago•0 comments

I've used AI to write 100% of my code for a year as an engineer

https://old.reddit.com/r/ClaudeCode/comments/1qxvobt/ive_used_ai_to_write_100_of_my_code_for_1_ye...
2•ukuina•1h ago•1 comments

Looking for 4 Autistic Co-Founders for AI Startup (Equity-Based)

1•au-ai-aisl•1h ago•1 comments

AI-native capabilities, a new API Catalog, and updated plans and pricing

https://blog.postman.com/new-capabilities-march-2026/
1•thunderbong•1h ago•0 comments

What changed in tech from 2010 to 2020?

https://www.tedsanders.com/what-changed-in-tech-from-2010-to-2020/
3•endorphine•1h ago•0 comments

From Human Ergonomics to Agent Ergonomics

https://wesmckinney.com/blog/agent-ergonomics/
1•Anon84•1h ago•0 comments

Advanced Inertial Reference Sphere

https://en.wikipedia.org/wiki/Advanced_Inertial_Reference_Sphere
1•cyanf•1h ago•0 comments

Toyota Developing a Console-Grade, Open-Source Game Engine with Flutter and Dart

https://www.phoronix.com/news/Fluorite-Toyota-Game-Engine
2•computer23•1h ago•0 comments

Typing for Love or Money: The Hidden Labor Behind Modern Literary Masterpieces

https://publicdomainreview.org/essay/typing-for-love-or-money/
1•prismatic•1h ago•0 comments

Show HN: A longitudinal health record built from fragmented medical data

https://myaether.live
1•takmak007•1h ago•0 comments