C++ is now ready for Engine API
by Richard Ranft · in Torque 3D Professional · 05/23/2013 (6:41 pm) · 14 replies
With the new C++11 standard the committee has introduced variadic templates! Now we can overcome the sole reason to stick with the ConsoleMethod and ConsoleFunciton macros.
I have barely looked at the thing, but it should be fairly straightforward. There's that word: "should."
I have barely looked at the thing, but it should be fairly straightforward. There's that word: "should."
About the author
I was a soldier, then a computer technician, an electrician, a technical writer, game programmer, and now software test/tools developer. I've been a hobbyist programmer since the age of 13.
#2
05/24/2013 (1:46 am)
This sounds exciting. Also like a massive amount of work ahead ;P. Though it doesn't look like they're supported in VC11.
#3
If you want a special branch that makes use of C++11 then go ahead, but do not introduce these breaking changes into the main repository branches development and master.
05/24/2013 (6:14 am)
Please do not make changes like these when several of us are still using VS2008. Don't expect people to immediately welcome new C++ standards so soon when they're still not very mature in recently released compilers. It took 5 years before most compilers even supported C99 maturely, note that VC++ doesn't even support C89 much less C99. It did take until VS2008 before VC++ supported C++98 and, the slight specification update of, C++03 standard.If you want a special branch that makes use of C++11 then go ahead, but do not introduce these breaking changes into the main repository branches development and master.
#4
05/24/2013 (6:32 am)
What Nathan said.Quote:
They may take our lives but they will never take our VS2008!
#5
05/24/2013 (7:50 am)
Sounds great, but its no good when C++11 support in VC++ is still spotty at best. Also if you want to use a variable number of arguments, why not just add a generic array type wrapper to engineAPI?
#6
@Daniel - it doesn't look like Microsoft supports them yet - but they're in the standard and the latest edition of Stroustroup's book details how to use them. That's why I was so excited about it - just go my copy Wednesday. I'm gonna call Bill and tell him to get it in the next VC++ update....
@James - I like that idea - why didn't you mention it 4 years ago? Now the language will have support for it (eventually) so creating a wheel to stand in until the actual wheel arrives is silly (it's not like we have a deadline).
I'm excited to experiment with the new language features, but it looks like it will be a minute before some are available :( !
05/24/2013 (7:51 am)
@Nathan - you worry too much.... ;p We only just dumped the VS 2005 projects, so why would anyone advocate forcing a bunch of hobbyists to update to the (not even available) latest version of Visual Studio that supports this? I agree that a branch is the way to approach this when someone finally gets around to addressing the issue (which will probably be a minute since VS apparently doesn't support them yet).@Daniel - it doesn't look like Microsoft supports them yet - but they're in the standard and the latest edition of Stroustroup's book details how to use them. That's why I was so excited about it - just go my copy Wednesday. I'm gonna call Bill and tell him to get it in the next VC++ update....
@James - I like that idea - why didn't you mention it 4 years ago? Now the language will have support for it (eventually) so creating a wheel to stand in until the actual wheel arrives is silly (it's not like we have a deadline).
I'm excited to experiment with the new language features, but it looks like it will be a minute before some are available :( !
#7
05/24/2013 (3:21 pm)
Actually, they have support for variadic templates and a few other features in VS 2012 through their consumer preview update. They just haven't added it to the official updates yet. Find it here
#8
05/24/2013 (3:39 pm)
To those using 2008, out of interest: what's stopping you from upgrading?
#9
05/24/2013 (3:46 pm)
If it ain't broke don't fix it. :P
#10
Here's a quote from Rob Caron, an official Microsoft representative answering a forum post about the option to upgrade from 2008 to 2010
05/24/2013 (4:19 pm)
@Daniel : I can't talk for them but I would expect that if you use a full, paid version of Visual Studio, the upgrades for it aren't free. And if you're used to the full version, you won't want to switch to Express 2012 and have two versions of Visual Studio running on the same machine. Here's a quote from Rob Caron, an official Microsoft representative answering a forum post about the option to upgrade from 2008 to 2010
Quote:
Upgrading Visual Studio Professional from 2008 to 2010 used to be US$549 MSRP. Earlier this year, we lowered the price of 2010 Professional from US$799 to US$499 and discontinued having a separate upgrade product (SKU). You can now "upgrade" for US$50 less than it used to be, or buy new for US$300 less than it used to be, but it's one product (SKU) at US$499 MSRP: http://www.microsoft.com/visualstudio/redir/buy-visual-studio-professional-2012
#11
05/24/2013 (4:37 pm)
The MSDN subscription is a much better deal.
#12
05/25/2013 (8:09 am)
Simon: that's a good point. I guess when MSVC actually implements stuff that would benefit Torque it becomes a relevant discussion to have: for how long do we support old software, etc.
#13
Funny you should say that - I do this all the time. But I'm probably not the average case. I usually have VS 2010 Pro and Express plus 2012 Pro and Express installed simultaneously, but that's leftovers from GG - making sure it compiles on everyone's favorite tool....
05/26/2013 (9:12 am)
Quote: And if you're used to the full version, you won't want to switch to Express 2012 and have two versions of Visual Studio running on the same machine.
Funny you should say that - I do this all the time. But I'm probably not the average case. I usually have VS 2010 Pro and Express plus 2012 Pro and Express installed simultaneously, but that's leftovers from GG - making sure it compiles on everyone's favorite tool....
#14
05/28/2013 (8:59 am)
I have VS 2008 and VS 2010 express on my laptop, only because when I compile libraries for my packs I need to have versions that both editions of MSVS recognize. Can be kind of tricky to keep up with sometimes, but I do like the idea of the upgrade so long as it doesn't mess with VS2008, since I mainly use that one.
Associate Charlie Patterson
Default Studio Name
The problem with the latest and greatest in an open-source code base is that you can't expect all the users to have the latest and greatest tools.