Live data from Hacker News

The C++ community is polarized about C++11's random-number facility

pcg-random.org

1–10 of 67 posts

Re: The C++ community is polarized about C++11's random-number facility

#3
post #2

I do not like it because http://stackoverflow.com/questions/18880654/why-do-i-get-sam...

Because Microsoft implemented random_device correctly while MingW / GCC hasn't?

Its a bug in MingW. Which isn't a big deal because Microsoft Visual Studio Community Edition is an excellent IDE and compatible with OSS projects now.

Re: The C++ community is polarized about C++11's random-number facility

#4
I wish they had mandated the algorithms used in the distributions. Even with the same generator initialized with the same seed, the normal distribution, for example, will give different results across platforms. At least the results of the generators are consistent across platforms.

Re: The C++ community is polarized about C++11's random-number facility

#6
"To the extent that anyone cares about C++11's random-number facility at all, the C++ community is polarized between two views—one that likes it, and one that hates it."

Isn't that almost a tautology? "People who care about X either love it or hate it".

Re: The C++ community is polarized about C++11's random-number facility

#8
post #5

Features like this make me think that C++ is designed by people who think that perfection is reached when there is nothing more to add. As a C developer, I side with Antoine de Saint Exupéry.

Sigh... Too often that criticism is leveled at C++ without an understanding of the terrain.

I don't think C developers should be sitting on a high horse on this one.

C represents a pretty good example of the problem. Almost every program that relies upon the standard C runtime's random functions has a flawed random distribution, so any correct program completely bypasses that infrastructure and/or has a ton of additional code/complexity layered on top of it.

That open source basically festered until the C++11 proposal was accepted. The chief proponents of that proposal were, of course, those with the most sophisticated needs & understanding for random functions, and the proposal reflects that. So, the problems with that proposal are arguably a consequence of the flaws in the original C standard.

What remains to be done is to harmonize that proposal with something that makes sense to less sophisticated users, who nonetheless have reached the point where their appreciate the problems with C's random functions.

Re: The C++ community is polarized about C++11's random-number facility

#9
post #2

I do not like it because http://stackoverflow.com/questions/18880654/why-do-i-get-sam...

Because Microsoft implemented random_device correctly while MingW / GCC hasn't? Its a bug in MingW. Which isn't a big deal because Microsoft Visual Studio Community Edition is an excellent IDE and compatible with OSS projects now.

[deleted]

Re: The C++ community is polarized about C++11's random-number facility

#10

"To the extent that anyone cares about C++11's random-number facility at all, the C++ community is polarized between two views—one that likes it, and one that hates it." Isn't that almost a tautology? "People who care about X either love it or hate it".

There's a wide spectrum between love and hate.
Post reply on HN