Live data from Hacker News

C++20, How Hard Could It Be

docs.google.com

291–300 of 444 posts

Re: C++20, How Hard Could It Be

#291

Say I have a new project to start today. I need pick a language to use: 1. a well-tested language 2. can not use garbage collector due to *performance* requirement 3. easy to hire if project expands. 4. ready to use tooling support 5. widely available tutorials and info on the web. 6. language is itself alive and updated 7. project can be scaled over time. what options do I have? I have to pick up c++ in this case. i…

> I played with nim, ziglang and Rust, but it's hard to use them for real product developments at this point for me

What made it hard? For example, Rust seem to fit your bullet list.

Re: C++20, How Hard Could It Be

#292
post #167
post #16

It is so ironic, that now that Apple and Google decided to focus on their own language stacks, the C and C++ compiler vendors that profit from clang's license aren't that keen in making the upstream work for catching up with ISO C++. Thus making the once famous clang having an honorable third place in ISO C++ compliancy. Seeing this from a Google team makes it even more ironic.

This has no relation to Clang's permissive license. The problem here is generally that nobody has implemented the necessary support, not that they have implemented support in their private forks but did not bother to upstream it. A GPL-style license doesn't magically force contributors to start working on a particular feature. Google at least is one of the largest contributors to the LLVM project -- it's just that th…

Anymore. Google used to contribute quite a lot to libc++ especially, but have found that the language is going in a direction that doesn’t meet its needs.

Not sure why Google would continue to contribute under those circumstances.

Re: C++20, How Hard Could It Be

#293
post #201

Earlier quoted context omitted.

Honest question: is it easy to find good C++ programmers these days?

that's a good question, I have yet to find a good beginner friendly modern c++ education material, be it a book or some course, that can make c++ learning simpler, to the point and enough to start to work with the language before diverting into those deep concepts. Someone needs to write a c++ 101 book, followed by 201 and 301 for beginner, intermediate, and advanced users.

“C++ Crash Course” by Starch seems to be such a beginner’s book, can’t recommend it enough. Although, I was learning C++ mostly for hobby projects.

Re: C++20, How Hard Could It Be

#294
post #275
post #267

Earlier quoted context omitted.

TBH I was shocked by "Python for machine learning". I do not know where that comes from. Maybe because some important toolkits are available for Neural Networks? But machine learning is not neural networks... you can do it with NNs, but there are so many other algorithms... I'm really surprise of this kind of posts in hacker news. I thought the audience here has other experiences.

Python is the main language for PyTorch and TensorFlow, there are few ML frameworks more complete than Scikit-learn, I'm not aware of an equivalent to NumPy in other languages, and this list is probably missing other things I don't use. What's the alternative for quick ML prototyping?

R, Matlab, Julia are some common alternatives.

Java/Scala I've also seen, specifically things around Spark ML, and Spark compute.

That said, Python is definitely the most common nowadays I'd say.

Re: C++20, How Hard Could It Be

#295
post #288
post #278

Earlier quoted context omitted.

That's literally the only one that didn't shock me. What universe do you live in where machine learning algorithms aren't tied together with Python? And what industry where machine learning is not mainly neural networks?

In the company I work most of it is done in matlab for "putting together" then goes to C++. Again not neural networks. I'm saying all the other machine learning. Maybe rare case.

What kind of machine learning does your company do? It's probably something simple, because for anything complicated, like computer vision, speech recognition, any non-trivial NLP, and large scale recommender systems you do need neural networks.

Re: C++20, How Hard Could It Be

#296
post #282

Honest question, do not want to insult anybody: I've heard lots of times, that the reason why C++ sometimes is weird and complex, is because utter care is taking in maintaining backward compatibility. Sorry if I'm wrong, but I remember seeing a video about variable initialization, which showed many ways of initializing variables, and at the end, the excuse was "all because we have to maintain compatibility to C". No…

The presentation mostly lists warnings and notices about deprecation. If you turn them all off, most likely the compilation would pass.

So, backwards compatibility is there (if we ignore newly introduced keywords).

Re: C++20, How Hard Could It Be

#297

Earlier quoted context omitted.

Ad-hoc black or white bans are very retrograde and costly for tje most part and usually stem from purity thinking. Case in point reflection in Java is a godsend. I use it very rarely because it'd uses only comes for very specific needs but when I use it, the alternative either doed not exist or usually would be much more uglier. As for streams well it's just regular functors (map, filter) they are used in every langu…

"no exceptions" is one of the best parts of Google style guide, IMO. Note that, banning of exceptions introduced returning status (error codes done right). It makes it easier to follow the code and makes the code more readable (but, you need a few macros, unfortunately).

No post body was provided.

Re: C++20, How Hard Could It Be

#298
post #254

Earlier quoted context omitted.

Because Java is known to magically never cause production outages?

Because the OP described inheriting a C++ app his team doesn't know how to manage. It's a language where segfaults, memory leaks, and other problematic issues are easy to manifest. I assume they have deep Java knowledge, since they suggested it themselves.

This would likely result in worse problems. Things You Should Never Do, Part I

https://www.joelonsoftware.com/2000/04/06/things-you-should-...

Re: C++20, How Hard Could It Be

#299
post #281

Earlier quoted context omitted.

I agree with this comment, and cannot understand why is downvoted. I would like the one that downvoted comments on why. My thinking, more or less in line with the comment is: instead of investing energy, time and resources in writing laws of what is allowed and what no (often without rationale). Use that time, effort and energy in educating developers, so that, if those prohibitions are really sensible, they will any…

What's easier: writing set of rules to drop language features or educating 10k engineers? It's difficult alone to have those engineers follow the style guide (even with help from linters etc). Average engineer, in any company, doesn't care about the language they use. Just wants to get stuff done. And that's how it should be.

No post body was provided.

Re: C++20, How Hard Could It Be

#300

Say I have a new project to start today. I need pick a language to use: 1. a well-tested language 2. can not use garbage collector due to *performance* requirement 3. easy to hire if project expands. 4. ready to use tooling support 5. widely available tutorials and info on the web. 6. language is itself alive and updated 7. project can be scaled over time. what options do I have? I have to pick up c++ in this case. i…

I think depending on the type of project, Rust might already be there. A couple of bullets raise questions: > ready to use tooling support This really depends on the use case. If the tooling you're looking for is "Unreal Engine", then Rust is definitely not there yet. But if you want to write network services, databases, CLI tools, etc., I think Rust has been fully viable with good tooling and library support for yea…

As somebody who writes C++ for my job, I don't think the tooling is particularly good so it's funny to me when people talk about that. Languages like Java or Python have good tooling, but C++ is a dumpster fire in terms of tooling.
Post reply on HN