Hacker News new | past | comments | ask | show | jobs | submit login

> then spend the rest of the day learning why I can't do what I want

There's a point when learning's fun, I think the OP is still there.

I wrote a bunch of realtime C++ in 2003, hated it. But last year, I wrote most of my code in C++ and liked it finally.

Lambda and auto was the tipping point where I stopped hating it. Some templates thrown in, but mostly to avoid writing a lot of branches for variants of the same function.

With lambdas I could now write the way I was initially taught programming, mostly by Lispy teachers channeling SICP.

Didn't hate the allocations either with unique_ptr.




If you haven’t already look up ‘if constexpr’ in cpp17 and newer. It lets you have compile time branches in a single function.


Also requires, which initially looks batshit insane but is in fact really quite cool: https://www.think-cell.com/en/career/devblog/if-constexpr-re...


> Unlike requires requires and requires { requires }, which are perfectly reasonable C++ code, requires requires { requires } is completely silly.

Normal day in cpp land...


How on earth did C++ brainrot lead them to think that reusing that keyword was anything but a nightmare? The very first line of the article

> Probably the two most useful features added to C++20 are requires and requires

said without a trace of irony ... the whole thing reads like parody!

I keep hearing that C++20 or whatever is getting so great but if so why would they specify such a dumpster fire of syntax???


"Lispy teachers channeling SICP" made new audibly laugh


> There's a point when learning's fun, I think the OP is still there.

What a horrible idea that one might no longer be there.


You hiring for positions where I can have fun programming?


Never hired anyone. But also never worked in any place where programming was not fun for me. But also never touched any Java or C++ job.




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

Search: