What Portable Apps?

closed account (1vRz3TCk)
Andrew Binstock wrote:
Unless we relearn portability skills, the C++ renaissance will be a short affair.

Not so long ago, if you coded natively and expected to offer your software on multiple operating systems, you knew how hard the road you'd chose was. You knew you'd have to test under various OSs and use macro identifiers to selectively include or exclude code for a given platform. You also knew that you might have to debug differing problems on disparate platforms. To minimize those issues, C and C++ developers learned a long list of techniques to avoid inadvertently platform-specific code.

...

read more at http://drdobbs.com/cpp/231901048
C++ renaissance? Good joke.
Especially this fragment is funny:


But more and more, at least part or all of your of your application needs to optimize for performance per dollar, or performance per watt, performance per transistor — because you can only put so many of them in a device. And that's why C++ is the preeminent language, because it's the king of performance per dollar. That's why it's making a comeback.


If this is true, why Java is the main programming language on Android, ObjectiveC is the main programming language on iOS, and HTML5 + JS will be the main platform on Windows 8 (for tablets). He must be living in some other universe.
closed account (1vRz3TCk)
Android "The Android NDK is a companion tool to the Android SDK that lets you build performance-critical portions of your apps in native code. It provides headers and libraries that allow you to build activities, handle user input, use hardware sensors, access application resources, and more, when programming in C or C++."

iOS
Objective-C is used for the Cocoa touch framework, it doesn't however get in the way of writing C/C++ code where you want for what ever reason you want.

Windows 8
I don't really care about what Microsoft do here...

The point is that when you want better performance, you go past 'main' programming language.

He must be living in some other universe.

Or he lives in the real world, not academialand.
Last edited on
Thanks for yet another worthless, irrelevant, inflammatory post, rapidcoder. Keep up the good work!

I don't know if I agree with that article. While there some pretty horrible cases (Sage was the first thing that came to mind as I was reading), most if not all of the software I've used so far was either not portable at all, or had good official ports or supported porting painlessly. I guess FFmpeg was a weird case where it's possible to produce a functional Windows port, but you have to do it cross-compiling from UNIX because Windows tools generate wrong code (MinGW) or don't build at all (VC++); this is somewhat understandable because the code uses inline Assembly for maximum performance. I don't think I've encountered any program that required the user to install Cygwin to run it.
closed account (1vRz3TCk)
I don't think I've encountered any program that required the user to install Cygwin to run it.
I guess I read it slightly differently as; it is not portable code if you have to setup a unix-like environment on Widows to be able to compile the code.
The article suggests that more and more developers choose C++ to write mobile applications, because C++ is good for performance. However, the author doesn't provide *any* evidence that the C++ renaissance even exists. It is just his wishful thinking and hyping their own C++ product. Although Google added NDK to Android, all of the GUI stuff you have to do in Java, all the important APIs are in Java, and you cannot write a 100% C++ app in it. Objective-C frameworks are also Objective-C mostly, and not C++ mostly. C++ in mobile apps was put to a role similar to the role of assembly in desktop apps. You can use it. Some probably do. But most developers do not.

Even iCircuit for iOS, which is a performance critical app, was written using MonoTouch, by a coder that considers himself "a C++ coder" (and it is slow as hell, but mostly due to poor algorithm and not the language).

http://www.michaelkerley.net/wp/2011/10/18/c-renaissance-im-not-so-sure/
Last edited on
closed account (1vRz3TCk)
rapidcoder,

Are you reading the same editorial?

The one that I am reading suggests that there is a resurgence in learning C++, possibly because of performance over portability/productivity. It also says that in the past people learnt how to write portable C++ code but don't now (or at least it is not a major concern). It also goes on to say that if you don't learn how to write portable code, the shift will go back towards 'more productive' languages like Java.

I think the over ridding theme of the editorial is that you should learn how to write portable code, nothing more.

Edit:
Oh I see now, you are using a quote from the linked Herb Sutter interview to suggest a point that was not made.
Last edited on
*sigh* rapidcoder, rapidcoder, rapidcoder...

You just don't know when to give up with your purposeless C++ hate-mongering, do you? C++ may not be perfect (which is why I endeavored to create my own language at one point), but for those of us who think on the level that it demands it is a pretty darn good language. EDIT: Fair. Maybe there isn't a C++ renaissance (which before this thread I had never heard of). However, there was no reason to be so inflammatory about it, was there?

How about making constructive comments for a change? I think many of us would appreciate that a lot more.

-Albatross
Last edited on
I simply stated I don't agree with the point presented in the linked article (and especially the one linked by the linked article). Don't take it personally.
Last edited on
You didn't simply state you disagreed, you made a point of doing it in a sarcastic and condescending way (well, you did in your first post, after that you were just bringing up points)

Either way, this article seems to be about the necessity of learning to write portable code, while the author flavored it with words connotative of his bias that doesn't mean the article is about how C++ is better than x language.

What did I just read? Is this guy even a programmer?

You'll never see complete cross-platform compatibility again so just forget that pipe dream. It is completley counter intuitive to the M$ business model, and as long as they are the dominate market force they will always be the gapping hole that discourages the effort.

In order for you to write code and have it compile on any platform to a native binary you need a library that takes the code you've written and translates it. Boost Asio does this, as does SFML and SDL for graphics. You could write your own, but then you're the poor sap who is stuck upkeeping it everytime any one of the targeted platforms gets a Kernel update.

I can't even believe that he tried to compare JVM to C\C++. JVM is a framework that takes the compiled binary and translates the code at run time to native system calls, it's basically a wrapper (although yes I agree it is a bit more then that). Yet in the same article he bashes on efforts like Cygwin and doesn't even mention WINE? Why because they're third party and don't require you to learn another language?
I simply stated I don't agree with the point presented in the linked article
The article makes only a passing mention of the so-called C++ Renaissance; it's about something entirely different. You just wanted to do some good ol' fashioned trolling, not make any kind of worthwhile point.
Be honest: how long have you been waiting for someone to make any sort of reference to the C++ Renaissance to be able to post that?

I guess I read it slightly differently as; it is not portable code if you have to setup a unix-like environment on Widows to be able to compile the code.
I think the article was written from the point of view of the (end) user, rather than the developer.
Far more common today is the practice of shipping a partial solution and expecting the user to provide the missing features. This trend is particularly visible in software written on Linux and later migrated to Windows. Very often, the packages require installation of Cygwin or its derivative, MinGW, to run.
closed account (1yR4jE8b)
You didn't simply state you disagreed, you made a point of doing it in a sarcastic and condescending way (well, you did in your first post, after that you were just bringing up points)


Jesus christ people, don't your knickers in a twist. Not everybody is all polite and proper, especially because, this is the internet for god's sake.

Rapidcoder is one of the most intelligent and informed posters on this board, and his criticisms are spot-on.
I acknowledge that courtesy isn't abundant on the interweb, but there is a difference from not being proper and just being an ass.

That said, I do agree that Rapidcoder knows his stuff well. Maybe if he was less arrogant in his posts more people would be willing to take his comments seriously. (or even pay attention to what he has to say in the first place)

EDIT: Upon reading the posts in a certain other thread on this forum it has come to my attention that there is a difference between being an arrogant ass and being crude and opinionated.

Rapidcoder I apologize for such inflammatory remarks.
Last edited on
CodeMonkey wrote:
iOS
Objective-C is used for the Cocoa touch framework, it doesn't however get in the way of writing C/C++ code where you want for what ever reason you want.


Have you ever worked on IOS? If you have you'll see that yes, it does inhibit c++. You cannot do the same things with c++ that you can with obj-c.
closed account (1vRz3TCk)
ultifinitus,

Whatever.
Topic archived. No new replies allowed.