frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

C++26 Reflections adventures and compile-time UML

https://www.reachablecode.com/2025/07/31/c26-reflections-adventures-compile-time-uml/
67•ibobev•4h ago

Comments

tombert•2h ago
I had to do a UML thing for the first time in years for a class a few weeks ago[2].

I'm not 100% convinced that UML is actually useful at all. Obviously if you find value from it, don't let me take that from you, by all means keep doing it, but all it seemed to provide was boxes pointing to other boxes for stuff that really wasn't unclear from looking directly at the code anyway. It's really not that hard to look directly at the class and look directly at the "extends" keyword (or the equivalent for whatever language you're using) and then follow from there. Maybe if you had like ten layers of inheritance it could be valuable, but if you're doing ten layers of inheritance there's a good chance that your code will be incomprehensible regardless.

I'm not against visual diagrams for code, I draw logic out with Draw.io all the time and I've been hacking on the RoboTool [1] toolkit a bit in my free time, but what UML offers always felt more masturbatory than useful.

Maybe I'm wrong, it certainly wouldn't be the first time, but every time I've tried to convince myself to like it I've left a little disappointed. It always kind of felt like stuff the enterprise world does to look like they're working hard and creating value.

[1] https://robostar.cs.york.ac.uk/robotool/

ETA:

[2] By "class", I meant like an education class, not a Java class.*

matt123456789•1h ago
Whenever I start to feel like a real programmer making games and webapps and AI-enhanced ETL pipelines, I inevitably come across the blog post of a C++ expert and reminded that I am basically playing with legos and play-doh.
tombert•1h ago
I'm not a C++ developer at all, but unless I'm missing something this didn't seem terribly difficult?

This isn't meant to make myself seem smart or to try and make you seem dumb, I'm just curious what was confusing about this even from a high-level perspective. It felt like a clever but not too atypical metaprogramming thing.

Maybe I've just done too much Clojure.

lmariscal•1h ago
I would argue that C++ expertise doesn't necessarily correlate to the complexity of the software being developed. Although I do try to learn the fancy new features I know many developers who even though they are still only using C++11 features they are creating some very complex and impactful pieces of software.
tw061023•1h ago
It's the other way around. You are the real programmer and the committee and the "modern C++" crowd are more interested playing with legos instead of shipping actual software.

No way anything std::meta gets into serious production; too flexible in some ways, too inflexible in others, too much unpredictability, too high impact on compilation times - just like always with newer additions to the C++ standard. It takes one look at coding standards of real-world projects to see how irrelevant this stuff is.

And like always, the problem std::meta is purported to solve has been solved for years.

d_tr•54m ago
What's the solution that's been around for years?

> ... just like always with newer additions to the C++ standard.

This is objectively laughable.

jcranmer•31m ago
> What's the solution that's been around for years?

Build tools to generate C++ code from some other tool. Interface description languages, for example, or something like (going back decades here) lex and yacc even.

mpyne•28m ago
I was literally running into something a couple of days ago on my toy C++ project where basic compile-time reflection would have been nice to have for some sanity checking.

And even if it's true that some things can be done already with specific compilers and implementation-specific hacks, it would be really nice to be able to do those things more straightforwardly.

My experience with C++ changes has been that the recent additions to compile-time metaprogramming operations is that they improve compile times rather than make it worse, because you don't have to do things like std::enable_if<> hacks and recursive templates to do things that a simple generic lambda or constexpr conditional will do, which are more difficult for both you and the compiler.

funkychicken•31m ago
I know the trading firm I work at will be making heavy use of reflection the second it lands… we had a literal party when it made it into the standard.
rramadass•15m ago
I know your comment was meant as a tongue in cheek funny one but people should not be intimidated/overawed by the size of the C++ feature set. You don't need to know nor use all of them but can pick and choose based on your needs and how you model your problem. Also much of the complexity is perceived rather than real since it takes time for one to understand and assimilate new concepts. You can program very effectively and productively using just C++98 features (along with C if needed) with no hint of "Modern C++" (never mind the fanbois :-) What this gives you is the ability to use a single language to tackle small constrained microcontrollers with very limited toolchain support all the way to using the latest and the greatest toolchain on top-of-line processors.
edg5000•1h ago
Reflection really was the missing piece, it's one of the things that are so nice in Java. Being able to serialize/deserialize a struct to JSON fully dynamically saves a lot of code.
peapicker•39m ago
Still waiting for IBMi to support C++11.

C++26 Reflections adventures and compile-time UML

https://www.reachablecode.com/2025/07/31/c26-reflections-adventures-compile-time-uml/
68•ibobev•4h ago•12 comments

Helsinki records zero traffic deaths for full year

https://www.helsinkitimes.fi/finland/finland-news/domestic/27539-helsinki-records-zero-traffic-deaths-for-full-year.html
544•DaveZale•3d ago•298 comments

Telo MT1

https://www.telotrucks.com/
466•turtleyacht•12h ago•433 comments

6 weeks of Claude Code

https://blog.puzzmo.com/posts/2025/07/30/six-weeks-of-claude-code/
316•mike1o1•2d ago•328 comments

HTML-in-Canvas

https://github.com/WICG/html-in-canvas
101•dannyobrien•6h ago•51 comments

Lina Khan points to Figma IPO as vindication of M&A scrutiny

https://techcrunch.com/2025/08/02/lina-khan-points-to-figma-ipo-as-vindication-for-ma-scrutiny/
127•bingden•7h ago•120 comments

Micron rolls out 276-layer SSD trio for speed, scale, and stability

https://blocksandfiles.com/2025/07/30/micron-three-276-layer-ssds/
7•rbanffy•3d ago•0 comments

Remote hosting for your telescope

https://www.sierra-remote.com/
91•gregorvand•3d ago•29 comments

The Crisis of Professional Skepticism

https://mitchhorowitz.substack.com/p/the-crisis-of-professional-skepticism
23•mathgenius•6h ago•8 comments

Ongoing Lean formalisation of the proof of Fermat's Last Theorem

https://github.com/ImperialCollegeLondon/FLT
53•anonyonoor•2d ago•24 comments

Anandtech.com now redirects to its forums

https://forums.anandtech.com/
176•kmfrk•15h ago•37 comments

We may not like what we become if A.I. solves loneliness

https://www.newyorker.com/magazine/2025/07/21/ai-is-about-to-solve-loneliness-thats-a-problem
375•defo10•18h ago•758 comments

PixiEditor 2.0 – A FOSS universal 2D graphics editor

https://pixieditor.net/blog/2025/07/30/20-release/
185•ksymph•2d ago•21 comments

Online Collection of Keygen Music

https://keygenmusic.tk
230•mifydev•4d ago•59 comments

Writing a basic service for GNU Guix

https://tannerhoelzel.com/gnu-shepherd-simple-service.html
3•hermitsings•1h ago•0 comments

Super-resolution of Sentinel-2 images (10M –> 5M)

https://github.com/Topping1/L1BSR-GUI
13•mixtape2025-1•3d ago•1 comments

LangExtract: Python library for extracting structured data from language models

https://github.com/google/langextract
32•simonpure•3d ago•3 comments

Mezzano, an operating system written in Common Lisp

https://github.com/froggey/Mezzano
60•dargscisyhp•3d ago•1 comments

The Art of Multiprocessor Programming 2nd Edition Book Club

https://eatonphil.com/2025-art-of-multiprocessor-programming.html
240•eatonphil•15h ago•35 comments

At a Loss for Words: A flawed idea is teaching kids to be poor readers (2019)

https://www.apmreports.org/episode/2019/08/22/whats-wrong-how-schools-teach-reading
117•Akronymus•16h ago•108 comments

Parsing without ASTs and Optimizing with Sea of Nodes [video]

https://www.youtube.com/watch?v=NxiKlnUtyio
7•surprisetalk•2h ago•0 comments

Browser extension and local backend that automatically archives YouTube videos

https://github.com/andrewarrow/starchive
146•fcpguru•12h ago•65 comments

Neural networks that learn non-linearity without activation functions [pdf]

https://www.tahabouhsine.com/nmn/assets/deep_learning_two_point_o_point_one.pdf
7•mlnomadpy•3d ago•4 comments

A.I. researchers are negotiating $250M pay packages

https://www.nytimes.com/2025/07/31/technology/ai-researchers-nba-stars.html
205•jrwan•17h ago•355 comments

The /o in Ruby regex stands for "oh the humanity "

https://jpcamara.com/2025/08/02/the-o-in-ruby-regex.html
144•todsacerdoti•14h ago•34 comments

Compressing Icelandic name declension patterns into a 3.27 kB trie

https://alexharri.com/blog/icelandic-name-declension-trie
203•alexharri•17h ago•75 comments

The Big Oops in type systems: This problem extends to FP as well

https://danieltan.weblog.lol/2025/07/the-big-oops-in-type-systems-this-problem-extends-to-fp-as-well
85•ksymph•2d ago•53 comments

Great Question (YC W21) Is Hiring a VP of Engineering (Remote)

https://www.ycombinator.com/companies/great-question/jobs/ONBQUqe-vp-of-engineering
1•nedwin•11h ago

Show HN: NaturalCron – Human-Readable Scheduling for .NET (With Fluent Builder)

https://github.com/hugoj0s3/NaturalCron
34•hugoj0s3•15h ago•7 comments

Show HN: WebGPU enables local LLM in the browser – demo site with AI chat

https://andreinwald.github.io/browser-llm/
117•andreinwald•14h ago•41 comments