frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

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

3•vodou•8h 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•7h 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•5h 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•3h 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•1h 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.

Show HN: FlowGram.AI – AI Workflow Building Engine

https://flowgram.ai/
1•xiamidaxia•1m ago•0 comments

Show HN: Longplay comes to the Mac – developer's commentary

https://adrian.schoenig.me/blog/2025/07/15/longplay-for-mac/
1•adrianschoenig•10m ago•0 comments

Show HN: The perfect win graph generator to track you winning streaks

http://www.echaozh.com/win-graph/
1•echaozh•10m ago•0 comments

Congress moves to reject bulk of White House's proposed NASA cuts

https://arstechnica.com/space/2025/07/congress-moves-to-reject-bulk-of-white-houses-proposed-nasa-cuts/
2•DocFeind•11m ago•0 comments

Claude Code System Prompt and Tool Descriptions

https://gist.github.com/sergeyk/b1eb7bf8fd8db2566c082409dbd3eca9
1•simonpure•13m ago•0 comments

He Called Me Out, Then Called Me In

https://mohammadhamid.net/news/mark-weiner-mohammad-hamid-mentorship
1•rmason•17m ago•0 comments

Open Source Multimodal Semantic Search

1•itstomo•18m ago•0 comments

Texan rare earth producer makes a play to end China's dominance

https://www.wsj.com/business/us-rare-earth-producer-texas-58796240
2•gsf_emergency_2•22m ago•0 comments

The reality of firearm suppressors vs. Hollywood

https://militaryrealism.blog/2025/06/12/silencers-not-very-silent/
2•bookofjoe•23m ago•0 comments

Show HN: Hot Take Generator – Turn your thoughts into hot takes

https://v0-hot-take-generator-ai.vercel.app/
1•beaniez•23m ago•0 comments

Laser smaller than a penny can measure objects 10 quintillion times per second

https://www.rochester.edu/newscenter/chip-scale-laser-ultrafast-optical-metrology-655642/
2•geox•24m ago•0 comments

Skintone Color Analysis AI Model and App

https://www.palettebymomo.com
1•saljump•29m ago•1 comments

Six Years of Gemini

https://geminiprotocol.net/news/2025_06_20.gmi
1•brson•31m ago•0 comments

Doug Wilson: a roadmap to American theocracy

https://www.politico.com/news/magazine/2025/05/23/doug-wilson-new-right-pastor-hegseth-trump-officials-00355376
2•jonjlee•33m ago•0 comments

Ask HN: Roadmap to a self-teach computer science?

1•shivajikobardan•37m ago•1 comments

What causes obesity? A major new study is upending common wisdom

https://www.washingtonpost.com/wellness/2025/07/16/obesity-cause-diet-exercise/
2•biblioteca•39m ago•0 comments

Show HN: I made a launch platform for AI-powered apps

https://launchurapp.com/
1•iamdemetrius•44m ago•0 comments

LLM Daydreaming

https://gwern.net/ai-daydreaming
2•nanfinitum•46m ago•0 comments

The Scourge of 'Spot-Fixing' Is Coming for American Sports

https://www.wsj.com/sports/baseball/spot-fixing-mlb-cricket-soccer-a573caaa
1•PaulHoule•47m ago•0 comments

Scientists hide messages in papers to game AI peer review

https://www.nature.com/articles/d41586-025-02172-y
2•signa11•48m ago•0 comments

Striatal astrocytes modulate behavioral flexibility and whole-body metabolism

https://www.nature.com/articles/s41467-025-60968-y
1•PaulHoule•51m ago•0 comments

Found a good prayer website to pray for others or request prayers

https://sendtheprayer.net
1•victor_cl•53m ago•0 comments

Boeing fuel switches safe, regulator says after Air India crash

https://www.bbc.com/news/articles/ce9xpgnx3vdo
1•maxbond•59m ago•1 comments

Building a Simple Router with OpenBSD

https://btxx.org/posts/openbsd-router/
3•transpute•1h ago•0 comments

A Minimal DDPM

https://github.com/metalwhale/minimal-ddpm
1•metalwhale•1h ago•0 comments

NixOS: Declarative Management, Imperative Privilege Escalation

https://labs.snyk.io/resources/nixos-deep-dive/
3•Bogdanp•1h ago•0 comments

Razor, Gun, Fence – Kieranhealy.org

https://kieranhealy.org/blog/archives/2025/06/26/razor-gun-fence/
3•MaysonL•1h ago•0 comments

Why the Upper Middle Class Isn't Special Anymore

https://ofdollarsanddata.com/the-death-of-the-amex-lounge/
5•deanmoriarty•1h ago•0 comments

Show HN: KVM backup script with telegram notifications

https://gist.github.com/tuxx/e1c896007b536490b98d2b261d46cf70
1•tuxxness•1h ago•0 comments

Show HN: Clippy – a better pbcopy for macOS that handles files properly

https://github.com/neilberkman/clippy
3•nberkman•1h ago•0 comments