Hacker Newsnew | past | comments | ask | show | jobs | submit | TheSoftwareGuy's commentslogin

The trailing return type pattern was added to the standard, IIRC, to make it easier for templated functions to have return types that depend on the types of the arguments, such as in this example:

    template <typename A, typename B>
    auto multiply(A a, B b) -> decltype(a * b) {
        return a * b;
    }
Its easier for the compiler to parse everything if `decltype(a * b) occurs _after_ the definition of `a` and `b`. Once this pattern was added and people started using it for that purpose, people also started using the pattern for all functions for consistency.

Yes, in that case I completely agree. Using it everywhere is a mistake IMHO. I know there might be a stylistic reason for using it everywhere, but I believe less code is better, unless more code makes it easier to understand.

I'm interested, as I've never been in an org with QA specialists. What does that look like?


You do everything the same as today. Then you turn it over to QA who keep finding weird things that you never thought of. QA finds more than half your written bugs (of course I don't write a bug everytime a unit test fails when doing TDD, but sometimes I find a bug in code I wrote a few weeks ago and I write that up so I can focus on the story I'm doing today and not forget about the bug)

QA should not be replacing anything a developer does, it should be a supplement because you can't think of everything.

We also use QA because we are making multi-million dollar embedded machines. One QA can put the code of 10 different developers on the machine and verify it works as well in the real world as it does in software simulation.


The are breakers. Good devs are makers.

You can be both but I have yet to meet someone who is equally good in both mindsets.


They find all the things the devs and their automated tests missed, then they mentor the devs in how to test for these and they work out how the bug could have been found earlier. Rinse and repeat until the tester is struggling to find issues and has coached the devs out of his job


Honestly I think micro mobility is an undervalued topic. It has the potential to really change the viability of transit in a ton of major cities, where transit infrastructure has poor coverage. And honestly anything at all that helps people not use cars has huge social benefits in my eyes.


IIRC those are basically hash tables, which are first-class citizens in many languages already


Yeah, this is one of my favorite things about LLMs right now: they haven't gone through any enshittification. Its like how google search used to be so much better


"yet" (openAI was recently forwarding an ad platform)


That's awful. I hope you were able to recover damages from the builders


Huh. I'm pleasantly surprised about this. Maybe there will be a long-lasting positive outcome from all this AI stuff after all


For those interested, this blog post also has a part 2 and 3:

https://hackeryarn.com/post/rust-macros-2/

https://hackeryarn.com/post/rust-macros-3/


Which confusingly are linked to on the 'prev' link at the bottom of each part...


Not necessarily. If $x is enough to get you 10x more Software engineering effort, people may be willing to increase their spending on software engineering, rather than decrease it


>Hard-code some logic to identify cranes and always assume there's a cable dangling from the end.

Probably this one. Even if the drone sees the crane, there's no guarantee the cable won't move faster than the drone can react.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: