5 ms·
WP8 and Windows 8 are definitely very C++ friendly. I actually think that C++ may be the language to rule them all as the next generation of web application goe
by HardyLeung 14y ago
WP8 and Windows 8 are definitely very C++ friendly. I actually think that C++ may be the language to rule them all as the next generation of web application goes beyond what Javascript can handle. Well, that and C# given Miguel's effort.
I can develop ONE piece of core logic, and have it run on iOS, Android, Windows, Mac, even web (via NativeClient). I posted an AskHN about this earlier today (though not much interest). That sounds like a win.
- bratsche 14y agoInterestingly enough, you can also run C# on NativeClient via Mono.
- cageface 14y agoIt's ironic, but C++ does seem to be the best language to write portable code in right now. C is just too low level and everything else is either too slow or tied to one platform.
- cantankerous 14y agoI was about to say "Java!!!" then realized how misplaced that statement was given the circumstances. Oracle really is shooting themselves in the foot here.
- Tloewald 14y agoHow much does Oracle care about Java as a language or platform? I think they want to sue Google, and the effect on Java is a non issue.
- zobzu 14y agoBleh, C++ sux to code for =/ I like C# although mono always failed to be nearly as good as .NET and that hindered C# a lot. If microsoft had realized it and made .NET multiplaform as well, and open source, we may live in a different world today. Heck, Microsft could be leading. But then again, rewritting the past is easier said than done.
- malkia 14y agoI don't get much of what you are saying here.. Any examples? Why would C code be less portable than C++? What C++ brings there that is more portable than C? I would expect the opposite - some runtimes do not allow exceptions, RTTI, dynamic_casting, or simply ABI interworkings due to name mangling and calling conventions for methods. Also virtual inhertiance and it's interworkings (where the this pointer is stored, and how multiple virtual ihneritance is done).
- cageface 14y agoFor example: I currently develop my own musical software instruments. This requires a lot of custom DSP code that has to be fast and portable. My only real choice here is C/C++. C is definitely even more portable than C++ but it's too low level (IMO) for application development.
- malkia 14y agoI'm sorry cageface. I've re-read it again, and I appologize.
- Tloewald 14y agoHe didn't say C wasn't cross-platform, just that it was "too low level" which I would dispute.
- cageface 14y agoI like C, but you have to ask yourself why it's so rarely chosen for large-scale development. For instance, the Chrome team is certainly smart enough to write Chrome in C, but they chose C++. Why? Surely they understand the tradeoffs and the warts of C++ well enough to make an informed choice.
- malkia 14y agoFirefox was written in C++, and WebKit too (coming from KDE). It could be that C++ is better fit for frameworks, while C for libraries. V8 is also C++, but lots of other successfull VM's are written in "C" I like "C" because it's more limiting, hence I won't see templates overused, or latest trick used (SFINAE). It's also easier for me to read. Also at binary level things are simpler - here is your function, and it's name, it takes this and this as parameter, and returns this and that, also follows this convetion (stdcall, pascal, fortran, etc.) With C++ my biggest pain has been name mangling. I'm not sure why this was not standartized. It's actually much better that the name of the function automatically contains what types it can take, which would've been much easier for dynamic binding, but then you have GNU, MSVC and others totally differs on how they mangle the name (and from version to version it changes a lot). Also exception handling (mingw/cygwin/msvc - there is big confusion there, and on binary compability level it's hard to combine one with another). My last show-stopper for C++ was - on this platform you can' t use this feature. For example on certain game consoles exceptions are not allowed. So you go with longjmp/setjmp, but then this would not unwind the stack and call destructors. Most of all, I got bitten by a heavily templated math library - it was much faster with optimizations than the one before, but without (debug) it was several times slower than same one before it. Why? Because it was relying on inlining everything, and back then gcc for playstation2 was not really inlining everything, even if it was forced. So every overloaded operation (matrix by matrix, or matrix by vector) was actually function call. There is another gotcha - sometimes overloaded C++ operators lose their ability to short-cut. For example overloading && and || would not longer short-cut, and many other gotchas. Most of all, I can't stand boost - it's just too huge. But I'm totally fine with C++ the simple way (whatever this is) - best example for me is ZeroMQ lib - it's C++ internally, they limit themselves to not use exceptions, and provide "C" interface by default. This makes it very easy to use from other languages - python, lua, ruby, etc.
- ConstantineXVI 14y agoNo details on WP8 are out yet, correct? I've heard from the rumor mill that it'll be derived from Win8, but nothing confirmed at all about the SDK.
- HardyLeung 14y agoYou are right that details are not out. What I said was purely conjecture on the part of WP8. However, given the roadmap, rumors, hints, discussions, the kind of people in charge (Sinofsky, known .Net hater), etc... I am pretty sure that WP8 will be like W8 in many regard. There were already some rumors (+ non-denial from MS) that WP8 may not run WP7.5 code so this seems a strong indication that it will be more like W8. And that's not a bad thing. I love C#/.Net (one of my projects, Tagxedo, was built with Silverlight), but given Microsoft doesn't have even the slightess will to push it, we may as well move on, or find some way to ride Mono. C++ is currently on my mind since it covers all ground (sans UI, which you still have to do anyway), probably in a way more straight-forward than Mono.
- randomfool 14y agoLack of C++ code is a significant limitation for high end mobile games- both from performance and porting costs. MS absolutely knows this (and hears it regularly from game dev houses). Dunno if it'll be solved in WP8, but they have something in the works. Derived from Win8 != WinRT- could just be the kernel and not app model.
- pcwalton 14y agoNative Client is only enabled for the Chrome Web Store at the moment. But you could use Emscripten.