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


Robin Dunbar's related book:

http://amzn.com/0571253423


those are amazing features I didn't expect C++ to have. I wonder if 'auto' is similar to type inference 'var' in C#.


C# does not have type inference: http://ideone.com/fmm92M. Nor does C++ for that matter: http://ideone.com/HzyM2E. This is type inference: http://ideone.com/0Gv8fV, http://ideone.com/r9nHUF. Note how the type checker figures out the list's element type from how the list is used.


You've said this same thing 3 or 4 other times in this thread.

Yes, yes, the formal definition of type inference as supported by languages like Haskell is not fully supported by C++, or Go, or C#, etc. But that's not the definition of it that anyone else in the comments here seem to be using, so can we drop it?

You seem to be knowledgeable about type theory. Is there a formalized term for the subset of type inference that C++11 supports? If so, can you just assume that others are using that term? Not that the discussion isn't interesting, but you're coming off as needlessly contrarian.


Type propagation.


Note how that's an anti-feature.


Whether a feature is a good or a bad thing to have is each programmer's subjective opinion. (But, of course, mine is diametrically opposed to yours: typeful programming would simply be impractical if you had to babysit the type-checker all the time.) OTOH, whether a language has or doesn't have a feature, is a technical fact.


It's not subjective at all. Features are good or bad for productivity. Maybe you have a different goal or have calculated the expected value differently, but with a well defined purpose it's not a subjective question.


> It's not subjective at all. Features are good or bad for productivity.

While productivity can be more or less objectively measured in the long run, the effects of a language feature on productivity vary from one programmer to another. There's no universal basis for evaluating this.

> Maybe you have a different goal

My primary goal is correctness. I don't really believe in 80% solutions. Having an incorrect program is just as good as having no program.

> have calculated the expected value differently

Very differently. My calculation is based on the following objective, unquestionable, technical facts:

(0) Determining whether the internal structure of a program is consistent (in the formal logic sense) involves lots of long, tedious and mostly unenlightening calculations.

(1) Computers are very good at performing long calculations. On the other hand, humans suck at it.

(2) Type structure, at least in sensibly designed languages, is the most efficient way known so far to communicate the intended logical structure of a program to a computer.

With type inference:

(0) The programmer only has to provide just enough information for the type checker to reconstruct the logical structure of the program.

(1) If the pieces fit together, the type checker will tell you exactly how.

(2) If the pieces don't fit together, the type checker will tell you exactly why.


OK, but you didn't specify a "well defined purpose". So what you said is obviously your opinion.

I find true type inference to be very helpful for readability. For example, you can write "let mut x = None;" where writing a type would be just noise.


prof.ousterhout's website contains links for archived courses: (https://web.stanford.edu/~ouster).


Most of the population here aren't as in the media stereotyped depiction. Most of them just like ordinary people around the globe, workers, teachers, doctors, students, business owners, etc...

They just doomed by .. well, you know, I can't say.

Take me as an example. I'm a regular guy from there. All my concerns in life right now is to get high grade in my (scikit-learn/keras)-based CS graduation project.

Looking towards silicon valley and scientific institutes in the world to get inspired. Hoping to get more time to learn React and become pro in rails/DotNET and contribute something that worth to the OSS.


They're not "ordinary people" like Americans or Germans. There is a face people (especially educated people) from these countries like to put on. "Oh, we are just like you." Except the normalization of domestic abuse; inhumane treatment of servants; strict gender roles; condemnation of homosexuals; the deep-seated racism. In the country where my parents come from, 87% of women are the victims of domestic violence: http://www.asianews.it/news-en/In-Bangladesh,-87-per-cent-of....

It's not a "media stereotype." I'm speaking from first-hand experience. I've seen most of the above in my own extended family (which is all educated and upper middle class). It's the dirty laundry and it's deeply ingrained in culture. Obviously, a lot of people do embrace western values. But I've met plenty of educated people from those countries with a western education whose are still trapped by their culture. They might be hackers who code, but they also think women shouldn't work.


Yes. Of course this is true. Governments operate differently than the people of the country. Every single Saudi person I have known has been generous and kind.

Good luck!


You too! thanks for your words.


yes, it's (4) chapters series only, at least until now.

the author has other related articles about the brain though like (Why Your Brain Needs More Downtime):

http://www.scientificamerican.com/article/mental-downtime/


I can only praise the idea and wish it to be an initiative that others follow. It sure helps connect people around the globe.


Looks very promising. Hope you the best.


A couple of days ago, I was thinking how rare we use program word now. web apps, mobile apps, standalone apps...


They don't have the octocat.


They have a fox though, so that's cool.


The GitLab logo is actually of a Tanuki (Japanese Raccoon Dog), but still kind of like a fox, as in, it definitely has that scrappy, playful, spirit. Certainly equally as cool as an Octocat.


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

Search: