Viewing profile — BenFrantzDale
BenFrantzDale
HN member- Joined
- Tue, Aug 19, 2014, 2:29 AM UTC
- HN karma
- 346
- Public activity
- 164 items
- HN profile
- View on Hacker News ↗
About BenFrantzDale
No profile information was provided.
Recent public activity
-
comment
Comment #47713034
> Skills are good for instilling non-repeatable, yet intuitive or institutional knowledge. What about just putting that sort of thing in human-targeted documentation? Why call it a…
-
comment
Comment #41653491
Have you compared perf with the reference implementation of the P2300 “Senders” proposal? https://github.com/NVIDIA/stdexec
-
comment
Comment #40296424
Having it available means we can use it explicitly. For example, I could see a compiler flag making `std::vector ::operator[]` be checked and then if profiling warrants, remove the…
-
comment
Comment #40296386
As a C++ user, shared_ptr is great for some things, but it is an anti-pattern. Shared_ptr is much much better. The problem is that shared_ptr isn’t value-semantic and so destroys l…
-
comment
Comment #39887345
Agreed. I just opened https://gitlab.kitware.com/cmake/cmake/-/issues/25846 although I have no idea how hard it is to address this sort of issue robustly.
-
comment
Comment #39776958
I agree. I wish we had to say `int x = std::uninitialized;`
-
comment
Comment #38507421
Can you express value semantics in Python, or is everything still passed by mutable reference still and duck-typed at runtime? I’m being flip, and I like Python for some things, bu…
-
comment
Comment #38288759
I thought that too. I think the point there was that you don’t have to push this notion as afar as in/out of functions: that just flipping them within a function can be beneficial.…
-
comment
Comment #38285693
I agrée with them and with you. It looks like they work in some poor language that doesn’t allow overloading. Their example of `frobnicate`ing an optional being bad made me think: …
-
comment
Comment #37538809
For list comprehension, we have (C++23): `std::ranges::to (items | std::views::filter(shouldInclude) | std::views::transform(f))` it’s not quite `[f(x) for x in items if shouldIncl…
-
comment
Comment #37521536
That’s what tests are for. And if `print_table` is factored properly then they won’t want to add flags, they’ll make a new function out of the pieces of `print_table` that has dist…
-
comment
Comment #37521511
If the sub-functions could be reused and people would be tempted to change them, then that’s what your tests are for. In fact, it’s often tricky to test the sun-function logic with…
-
comment
Comment #37521490
I totally agree. And you can always write mutating “functions” (what get called “algorithms” in the C++ world), like C++’s `std::ranges::sort(range)`.
-
comment
Comment #37520986
This blogger obviously wouldn’t get along with Sean Parent of Adobe. It’s old but I have everyone on my team watch this “no raw loops” presentation: https://youtu.be/W2tWOdzgXHA?si…
-
comment
Comment #37061095
I write C++ including the conventions around the strong units library we use. What this article promote as “better” seems pretty bad. They dont like `Money m = new Money(10.0m); de…
-
comment
Comment #37016988
And conversely, if you are using classical polymorphism, you can get essentially the effect of PImpl by having an abstract base class with a static factory function that returns a …
-
comment
Comment #37016947
I’m curious: do you use a `const std::unique_ptr ` or just a `std::unique_ptr ` or do you have a template that provides value semantics for the `Impl`? If I used PImpl a lot I’d ma…
-
comment
Comment #37016250
If your internal representation is stable, you can put private functions in a private friend class that is only defined in the cpp file: `private struct access; friend struct acces…
-
comment
Comment #36832082
C++ also has `std::expected `.
-
comment
Comment #36376698
What I find most fascinating about LLMs isn’t that they are smart but that they are different from the smarts I’m used to. It’s not that smart but it knows far more than any human …
-
comment
Comment #36119826
I think polymorphism has its place, and Lakos’s use of them for allocators is one such place: it lets you bind a well-defined interface to a concrete implementation at runtime. So …
-
comment
Comment #35672451
Windward and upwind are different in my book: windward is anything to the side of the boat opposite the main boom, whereas upwind is you draw a line perpendicular to the wind direc…
-
comment
Comment #35335432
I assume it’s been around forever. https://en.cppreference.com/w/cpp/language/new (Placement-new is the thing you are talking about.) C++20 has `std::construct_at` which does the s…
-
comment
Comment #34964115
As one data point: we are replacing Golang with C++ for homogeneity and not-weirdness. C++ has problems but it is very good at scaling and being boring, which is a good thing.
-
comment
Comment #34452148
Exactly this. I’ve seen architectural decisions that over time lead to exponential work to implement new features. An architectural fix can lead to a big-O difference in productivi…