frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Banned C++ Features in Chromium

https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md
58•szmarczak•2h ago

Comments

Night_Thastus•1h ago
Nothing particularly notable here. A lot of it seems to be 'We have something in-house designed for our use cases, use that instead of the standard lib equivalent'.

The rest looks very reasonable, like avoiding locale-hell.

Some of it is likely options that sand rough edges off of the standard lib, which is reasonable.

dfajgljsldkjag•1h ago
The banned list proves that context matters more than having the newest tools. These features work well for small apps but they cause problems in a project this size.
ddtaylor•1h ago
Exceptions are banned, but an exception is made for Windows.
refulgentis•51m ago
grep'd "exception" and "Windows", tl;dr only Windows reference is for `[[no_unique_address]]`. Therefore I am probably missing a joke :)
jesse__•48m ago
Might be referring to SEH ..? Just a wild guess
refulgentis•42m ago
Ah, found it: in the style guide linked from this article. https://google.github.io/styleguide/cppguide.html#Exceptions
jesse__•58m ago
It's remarkable to me how many codebases ban exceptions and yet, somehow, people still insist they're good.
tester756•54m ago
They're good for exceptional situations where foundamental, core assumptions are broken for some reason.

In such scenario there's no error recovery, software is expected to shutdown and raise loud error.

dijit•51m ago
I use asserts for this purpose.
jesse__•49m ago
If you're planning on shutting down, what's the fundamental difference between throwing an exception, vs simply complaining loudly and calling exit() ..?
trinix912•43m ago
Sometimes it’s useful to handle the exception somewhere near its origin so you can close related resources, lockfiles, etc. without needing a VB6 style “On Error GoTo X” global error handler that has to account for all different contexts under which the exceptional situation might have occurred.
PhilipRoman•26m ago
Your process can crash or be killed at any moment anyway. Depending on in-band cleanup is not reliable.
matheusmoreira•9m ago
> a VB6 style “On Error GoTo X” global error handler that has to account for all different contexts under which the exceptional situation might have occurred

... That seems like a pretty accurate description of how exception handling mechanisms are implemented under the hood. :)

wvenable•49m ago
Looking at this ban list, they've removed everything from C++ that makes it fun.

On banning exceptions:"Things would probably be different if we had to do it all over again from scratch."

https://google.github.io/styleguide/cppguide.html#Exceptions

BeetleB•48m ago
> Our advice against using exceptions is not predicated on philosophical or moral grounds, but practical ones. ... Things would probably be different if we had to do it all over again from scratch.

They are clearly not against them per se. It simply wasn't practical for them to include it into their codebase.

And I think a lot of the cons of exceptions are handled in languages like F#, etc. If f calls g which calls h, and h throws an exception, the compiler will require you to deal with it somehow in g (either handle or explicitly propagate).

jesse__•46m ago
My issue with exceptions is also practical. If they didn't introduce significant stability issues, I'd have no problem. As it stands, it's impossible to write robust software that makes use of C++ exceptions.

> the compiler will require you to deal with it somehow in g

I agree, this is the sensible solution.

heyitsdaad•44m ago
The “pros” list is exceptionally weak. This was clearly written by someone who doesn’t like exceptions. Can’t blame them.
jandrewrogers•32m ago
In low-level systems software, which is a primary use case for C++, exceptions can introduce nasty edge cases that are difficult to detect and reason about. The benefits are too small to justify the costs to reliability, robustness, and maintainability.

Exceptions in high-level languages avoid many of these issues by virtue of being much further away from the metal. It is a mis-feature for a systems language. C++ was originally used for a lot of high-level application code where exceptions might make sense that you would never use C++ for today.

BeetleB•21m ago
> In low-level systems software, which is a primary use case for C++

I can assure you: Most C++ SW is not written for low-level.

> exceptions can introduce nasty edge cases that are difficult to detect and reason about.

That's true, except for languages that ensure you can't simply forget that something deep down the stack can throw an exception.

BTW, I'm not saying C++'s exceptions are in any way good. My point is that exceptions are bad in C++, and not necessarily bad in general.

beached_whale•11m ago
The model of communicating errors with exceptions is really nice. The implementation in C++ ABI's is not done as well as it could be and that results in large sad path perf loss.
matheusmoreira•15m ago
Exceptions are actually a form of code compression. Past some break even point they are a net benefit, even in embedded codebases. They're "bad" because the C++ implementation is garbage but it turns out it's possible to hack it into a much better shape:

https://youtu.be/LorcxyJ9zr4

beached_whale•12m ago
C++ exceptions are fast for happy path and ABI locked for sad path. They could be much faster than they are currently. Khalil Estell did a few talks/bunch of work on the topic and saw great improvements. https://youtu.be/LorcxyJ9zr4
kllrnohj•6m ago
If you forget to handle a C++ exception you get a clean crash. If you forget to handle a C error return you get undefined behavior and probably an exploit.

Exceptions are more robust, not less.

jayd16•29m ago
Is this correct? I don't know F# but I thought it had unchecked exceptions. How does it handle using C# libs that throw unchecked exceptions?
BeetleB•21m ago
My memory of F# is very rusty, but IIRC, there are two types of error handling mechanisms. One of them is to be compatible with C#, and the other is fully checked.
azov•22m ago
Most codebases that ban exceptions do it because they parrot Google.

Google’s reasons for banning exceptions are historical, not technical. Sadly, this decision got enshrined in Google C++ Style Guide. The guide is otherwise quite decent and is used by a lot of projects, but this particular part turned out pretty toxic for larger C++ ecosystem.

WalterBright•18m ago
Modules are banned - they should have just copied D modules.

Unrolling the Codex agent loop

https://openai.com/index/unrolling-the-codex-agent-loop/
116•tosh•2h ago•50 comments

New YC homepage

https://www.ycombinator.com/
92•sarreph•4h ago•37 comments

Banned C++ Features in Chromium

https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md
58•szmarczak•2h ago•28 comments

Proof of Corn

https://proofofcorn.com/
279•rocauc•5h ago•207 comments

Gas Town's agent patterns, design bottlenecks, and vibecoding at scale

https://maggieappleton.com/gastown
208•pavel_lishin•6h ago•239 comments

Route leak incident on January 22, 2026

https://blog.cloudflare.com/route-leak-incident-january-22-2026/
100•nomaxx117•5h ago•17 comments

Microsoft gave FBI set of BitLocker encryption keys to unlock suspects' laptops

https://techcrunch.com/2026/01/23/microsoft-gave-fbi-a-set-of-bitlocker-encryption-keys-to-unlock...
518•bookofjoe•5h ago•368 comments

Mental Models (2018)

https://fs.blog/mental-models/
23•hahahacorn•1h ago•4 comments

Gold fever, cold, and the true adventures of Jack London in the wild

https://www.smithsonianmag.com/history/gold-fever-deadly-cold-and-amazing-true-adventures-jack-lo...
24•janandonly•5d ago•0 comments

TrueVault (YC W14) is hiring a Growth Lead to test different growth channels

https://www.ycombinator.com/companies/truevault/jobs/njvSGDj-growth-lead
1•jason_wang•2h ago

KORG phase8 – Acoustic Synthesizer

https://www.korg.com/us/products/dj/phase8/
162•bpierre•8h ago•82 comments

Notes on the Intel 8086 processor's arithmetic-logic unit

https://www.righto.com/2026/01/notes-on-intel-8086-processors.html
61•elpocko•5h ago•8 comments

EquipmentShare (YC W15) goes public

https://www.ycombinator.com/blog/congratulations-to-equipmentshare/
7•subsequent•1h ago•7 comments

Booting from a vinyl record (2020)

https://boginjr.com/it/sw/dev/vinyl-boot/
254•yesturi•12h ago•98 comments

Killing the ISP Appliance: An eBPF/XDP Approach to Distributed BNG

https://markgascoyne.co.uk/posts/ebpf-bng/
58•chaz6•5h ago•15 comments

Nobody likes lag: How to make low-latency dev sandboxes

https://www.compyle.ai/blog/nobody-likes-lag/
47•mnazzaro•5h ago•20 comments

Proton Spam and the AI Consent Problem

https://dbushell.com/2026/01/22/proton-spam/
456•dbushell•16h ago•305 comments

Waypoint-1: Real-Time Interactive Video Diffusion from Overworld

https://huggingface.co/blog/waypoint-1
44•avaer•8h ago•13 comments

The tech monoculture is finally breaking

http://www.jasonwillems.com/technology/2025/12/17/Tech-Is-Fun-Again/
90•at1as•7h ago•120 comments

Floating-Point Printing and Parsing Can Be Simple and Fast

https://research.swtch.com/fp
74•chmaynard•4d ago•3 comments

Show HN: Whosthere: A LAN discovery tool with a modern TUI, written in Go

https://github.com/ramonvermeulen/whosthere
185•rvermeulen98•11h ago•66 comments

Neko: History of a Software Pet (2022)

https://eliotakira.com/neko/
27•mifydev•2h ago•7 comments

Certificate Transparency Log Explorer

https://certs.swerdlow.dev
4•benswerd•3h ago•0 comments

Show HN: Zsweep – Play Minesweeper using only Vim motions

https://zsweep.com
58•oug-t•5d ago•26 comments

Zotero 8

https://www.zotero.org/blog/zotero-8/
164•bouchard•5h ago•38 comments

European Alternatives

https://european-alternatives.eu
563•s_dev•10h ago•307 comments

Radicle: The Sovereign Forge

https://radicle.xyz
242•ibobev•9h ago•119 comments

Ask HN: What's the current best local/open speech-to-speech setup?

18•dsrtslnd23•12h ago•3 comments

Anthropic Economic Index report: economic primitives

https://www.anthropic.com/research/anthropic-economic-index-january-2026-report
95•malshe•1d ago•56 comments

Show HN: New 3D Mapping website - Create heli orbits and "playable" map tours.

https://www.easy3dmaps.com/gallery
25•dobodob•5h ago•14 comments