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

I’m definitely missing the point, but reading the article, I kept thinking "This would’ve been so much easier in C."


No, it would be impossible in C, the "it" here being the automatic conversion of a struct to an array of the struct's fields. Sure, you can do that pretty easily by hand in C, but you can also do it easily by hand in C++, so whatever. The point of the article is the metaprogramming.


I get the impression that ("pure") C programmers say things like that because they don't get themselves into situations where they feel they'd want the metaprogramming.


They might think that they don't need metaprograming, but like everyone else, they eventually do.

That's how we get monstrosities like https://github.com/freebsd/freebsd-src/blob/master/sys/sys/q... (plenty of Linux equivalents --- e.g. the tracepoint stuff)

Better to use a language with thoughtful metaprogramming than tack it on badly later.


I don't see how it would be easier. Whatever you can do in C, you can do in C++. That said, I was also a bit confused, since I guess I don't keep up with the latest C++ updates enough.


Less than 2 weeks after Frank passed away.

Not very classy.


Alexa, turn on the [room] lights!


Do you directly pay for your roads? Do you care how much it cost?


How much of the government budget goes to roads?


About 6% of spending goes to transportation. ~$150 billion.


Do you remember the name?



"Copyright ©2011" might be why.


So now what's the difference between Shyp and any other delivery company?


Shyp picks up and packages the stuff for you, not delivers to you.

In cities that they've launched they're also able to sometimes offer cheaper rate for shipping (including the $5 pickup fee) than you'd get by driving to a UPS Store / FedEx Office, because they enjoy a heavy discount due to volume.


I guess the way to solve this disease is just to use Enum for what they are supposed to be used for. Which is storing a state, that's it.

This article really lacks of OOP concept. In the first example the enum is a property on the 'vehicule' object, it would be way better to add all the properties needed to that class instead of creating a weird 'VehicleTypeTuple' struct...


We have just updated our website, it's in english now ;).

http://jarriveapp.com


@th0br0 J'arrive is absolutely not a check-in like app. It's an app that going to help you to share your location with your friends for a given amount of time. You can compare it with 'Find my Friend' but available for everyone (not only iPhone's user). And don't worry about your French, J'arrive will be available in english (with of course some french touch magic in it ;)).


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

Search: