Messages - Eóin [ switch to compact view ]

Pages: prev1 ... 10 11 12 13 14 [15] 16 17 18 19 20 ... 280next
71
Developer's Corner / Re: Herb Sutter's brief look at C++11
« on: November 01, 2011, 01:50 PM »
Sounds like a great way to make code disposable, because coming back at a snippet months later it wont be real clear what the hell it does if it isn't commented thoroughly.

If misused sure, but I don't believe features should be left out because they could be misused. Also when you consider polymorphism and generic coding, both present in C++ for years now, this auto isn't exactly a whole new paradigm anyway.

72
Developer's Corner / Re: Herb Sutter's brief look at C++11
« on: November 01, 2011, 09:16 AM »
With the likes of iterators I think it's a great thing, after all you don't want to care what the actual type of an iterator is, just that it behaves like you expect it to. It's duck typing but with the compiler verifying everything at compile time rather than forcing you to deal with runtime errors.

For the example you give, well I agree with you. But then foo is a local variable, likely it's lifetime is pretty short and it's type isn't as important as that it behaves as a vector-ish of strings. If your code specifically requires it to be a std::vector you can be more specific.

auto isn't necessarily meant to be used everywhere.

[edit] mouser beat me to saying much the same thing :)

73
Developer's Corner / Re: Herb Sutter's brief look at C++11
« on: October 31, 2011, 07:15 PM »
I must say I'm loving the few C++11 features that appeared in Visual Studio 2010. Can't wait to get developing with the fuller new standard library.

74
Developer's Corner / Herb Sutter's brief look at C++11
« on: October 31, 2011, 02:51 PM »
Herb Sutter, Microsoft's head C++/CLI guy and author of the famous Guru of the Week columns, has nice little overview of some of C++11 new features over on this blog. It's really worth checking out.

The C++11 standard offers many useful new features. This page focuses specifically and only on those features that make C++11 really feel like a new language compared to C++98, because:

  • They change the styles and idioms you’ll use when writing C++ code, often including the way you’ll design C++ libraries. For example, you’ll see more smart pointer parameters and return values, and functions that return big objects by value.
  • They will be used so pervasively that you’ll probably see them in most code examples. For example, virtually every five-line modern C++ code example will say “auto” somewhere.

75
Living Room / Re: Steve Jobs is dead.
« on: October 26, 2011, 02:07 PM »
True, he also robbed a lot of other people ideas and claimed they were his.

He was famous for taking all the credit.

Apple's famous designer, Jonathan Ive, was frustrated because Steve was constantly taking credit for his ideas.  It was a recurring problem, with incredibly talented executives complaining that Jobs took all the credit for Apple's game-changing innovations.  "I pay maniacal attention to where an idea comes from, and I even keep notebooks filled with my ideas," Ive said.  "So it hurts when he takes credit for one of my designs."

Pages: prev1 ... 10 11 12 13 14 [15] 16 17 18 19 20 ... 280next
Go to full version