Facebook Has a New Private Mobile Photo-Sharing App, and They Built It In C++ 173
jfruh writes: Facebook [on Monday] announced Moments, a new mobile app that uses Facebook's facial recognition technology to let you sync up photos only with friends who are in those photos with you. Somewhat unusually for a new app, the bulk of it is built in the venerable C++ language, which turned out to be easier for building a cross-platform mobile app than other more "modern" languages.
Nothing about Facbook is private (Score:5, Insightful)
Fixed that for you.
Re:Nothing about Facbook is private (Score:5, Interesting)
I'd like to add that with employers intruding more and more on our personal lives - we are on the clock 24/7 these days even though we're only paid for 40 hours. They are starting to scrutinize every aspect of our lives. [usatoday.com]
And what I find disturbing is that younger folks, who grew up with facebook and other crap like that, think nothing of posting pictures of parties or other gatherings where one might be doing something that your current or future employer may find objectionable.
I am more paranoid about what a backgroundcheck would turn up than even government persecution - I haven't started hiding Mulsims from stormtroopers yet in my basement. But being denied employment because someone put a photo of me holding a tray of shots and hanging out with some cross dressing friends frightens me. The job is too capricious and managing ones image is extremely important - and it is a sucky World that we live in - thanks corporate America for having privatized Stasi!
Re:Nothing about Facbook is private (Score:5, Interesting)
If the vast majority of the new generation manage to piss off future employers, what are these businesses going to do, not hire anyone at all? Because they certainly aren't going to start hiring 50 year olds.
Re: (Score:3)
If the vast majority of the new generation manage to piss off future employers, what are these businesses going to do, not hire anyone at all? Because they certainly aren't going to start hiring 50 year olds.
This strategy seems to be working for military and police agencies not hiring white hats who were formerly grey hats or black hats.
Oh wait. The government keeps getting their computers successfully attacked... guess it's not a great strategy after all. Never mind.
Re: (Score:2)
This is a case of selection bias. We see people posting ridiculous things, so we think everyone does, but believe me, there are plenty of people who don't post stupid shit to Facebook, and are -- not surprisingly -- very competent and responsible people, or who are at least competent enough to appear to responsible. There's no shortage of competition for jobs in sensitive industries, whether it's finance, government, or law, and yes, they pass on people who post stupid shit on Facebook.
Re: (Score:2)
Whew, I thought it was just every one of my friend's teenagers and most of the interns at work. But thanks for sharing, I'm glad it's only occurring among people that I interact with and is not a broader issue.
Re: (Score:2)
If the vast majority of the new generation manage to piss off future employers, what are these businesses going to do, not hire anyone at all? Because they certainly aren't going to start hiring 50 year olds.
Ummm... you already know the answer to this since you work in Silly Valley currently: They will bring in more H1Bs since there will not be enough "qualified" workers locally. Heheh.
Re: (Score:2)
They already hire H1-Bs, not because of behavior but because guest workers generally accept lower pay than a domestic new college grad.
Re: (Score:2)
So this weeding out of objectionable individuals will mainly be applied to non-whites. :(
I'm starting to see the problem here.
Re: (Score:2)
Re: (Score:2)
That's because it is strange (at least for IT jobs, not McJobs). Having multiple clients at a time, however, is not.
Re: (Score:2)
Re: (Score:2)
I have no room for Muslims in my basement. That is where I keep my small Lithuanian boys and an elderly man of indeterminate (Hispanic?) ethnicity. The boys carry my packets to and from the ISP's network. The elderly man whistles a mean modem. I call them Team Server Room II. They replaced Team Server Room after the infamous 'Halon Incident.'
Re: (Score:2)
Nobody is forcing you to be a wage slave; you can run your own small business.
What I find disturbing is that so many people, old and young alike, subscribe to the idea th
Re: Nothing about Facbook is private (Score:2)
Unless you are an hourly employee, you are not being paid for 40 hours. Common thinking, but wishful thinking.
Re: (Score:2)
Re: (Score:2)
A chocolate candy? A cartoon Martian? Two-thirds of an adhesives company? Massively Multiplayer? WTF are you talking about?
"Sometimes the best tool for the job is the oldest (Score:2, Funny)
one in the toolshed."
So, what, it's written in Lisp with some Fortran libraries?
Re: (Score:2)
Why is that modded funny? It's not a half-bad idea!
(Of course, these days when you want half-Lisp, half-Fortran, you use a different syntax and call it Matlab (or GNU Octave). It's better than using C++, at any rate!)
Never underestimate (Score:5, Funny)
Re: (Score:2)
Of course, because the compiler leaves *all* those #ifdefs in the binary. You know, all those the preprocessor didn't catch.
Re: (Score:2)
Ah, I remember fondly the old days of MUD code in C, written to support 15 flavors of UNIX, MacOS, and 3 flavors of DOS. The #ifdef's on the socket code could go on for miles.
Re: (Score:2)
Ah, I remember fondly the old days of MUD code in C, written to support 15 flavors of UNIX, MacOS, and 3 flavors of DOS. The #ifdef's on the socket code could go on for miles.
Yes, and today we have POSIX and we code for that. And we use Boost ASIO to hide the Windows/POSIX differences from the application developer.
Re: (Score:2)
Oh yeah! I forgot; we had #ifdef __posix, too!
Absolutely non-obligatory XKCD: https://xkcd.com/927/ [xkcd.com]
But yeah, I was ripping out a lot of legacy code and replacing it with POSIX; this was the late 90's, so it was already well-established.
Re: (Score:2)
Re: (Score:3)
Re: (Score:2)
Not if it does a lot of low level systems calls. Unless you think win32 is going to work on Linux for example or Xlib will have no problem working on Windows.
Re:Never underestimate (Score:5, Informative)
Generally, you'd hide that sort of code behind some abstract interfaces. You don't need an #ifdef if you replace an entire .cpp file per OS target. My entire game engine, written in cross-platform C++, uses very few #ifdefs to divide between platforms (Windows/Mac/Linux).
It's also clear the author doesn't really understand what modern C++ actually looks like because of this statement:
It is less widely used, however, for mobile platforms, given that it can be a challenge to program in because it forces the developer to deal with memory management and other subtle nuances in abstraction.
This simply isn't true any more for code written using modern (i.e. C++ 11/14) techniques. Using smart pointers (automatic reference counting) and proper RAII techniques means that you never really have to worry about explicitly managing your memory - you simply need to manage your object lifetime, and when all references are released, the memory goes away as well. In fact, while managed memory may be slightly superior in terms of ease of use, I've found smart pointers + RAII to be arguably *superior* for managing *other* types of system resources, because you can guarantee exactly when they'll be released (via a destructor).
Also, I'm a bit confused about this:
From Dropbox, the company borrowed a piece of software called Djinni, which converts C++ data models into Java code, the runtime language for Android.
You can compile C++ natively for Android, so I suspect they're talking about using Djinni to automatically create an interop layer between their C++ code and Java, which would be handy for accessing a large portion of the SDK via Java. They also talked about how it's fairly easy to create an interop bridge between C++ and Objective-C, something I've also done with my own code.
Re: (Score:2)
Generally, you'd hide that sort of code behind some abstract interfaces. You don't need an #ifdef if you replace an entire .cpp file per OS target. My entire game engine, written in cross-platform C++, uses very few #ifdefs to divide between platforms (Windows/Mac/Linux).
For some features, the trick of using an "if" statement can keep the code readable. The compiler will optimize it out if it's not needed. For example:
.
.
. .
.
#define COOL_FEATURE_INSTALLED 1
if( COOL_FEATURE_INSTALLED) {
}
That's something I learned from the Linux kernel.
Re: (Score:2)
Why not just use the standard:
#ifdef COOL_FEATURE_INSTALLED
#endif
In debug mode, that runtime check is not guaranteed to be optimized out, even if it's not executed, but in my version it certainly would, because it's performed by the preprocessor. All a normal if() check with a constant is doing is obscuring the fact that you're removing code at compile time. It's also likely to generate a compiler warning of "unreachable code" as well. Just because it's in the Linux kernel doesn't mean it's necessarily a
Re: (Score:2)
>Because that's ugly when integrated with normal code.
Is it? Seems cleaner to me. HYMMV.
>These are really dumb reasons.
They seem like good reasons to me. I think you're the one trying to argue your prefered method without any decent reasons to back it up other than you prefer it aesthetically.
Re: (Score:2)
Not if it does a lot of low level systems calls. Unless you think win32 is going to work on Linux for example or Xlib will have no problem working on Windows.
Even then #ifdefs are the wrong way to do it. Create a system abstraction layer (or use one of the several excellent ones that exist) and call that. Then for each platform build and link the appropriate implementation of the abstraction layer.
The C++ committee has been aggressively removing all need for the preprocessor. Function-style macros should be inline functions. Macro-based code generation should be replaced with templates. Constants should be actual constants. About the only valid need left is f
Re: (Score:2)
"Even then #ifdefs are the wrong way to do it. Create a system abstraction layer (or use one of the several excellent ones that exist) and call that. Then for each platform build and link the appropriate implementation of the abstraction layer. "
Sorry, I disagree. Abstraction layers are inefficient and add to bloat especially if the code only differentiates in a few places between platforms. I'm sure they look nice on a whiteboard design but in the real world they're rarely the best solution for home grown
Re: (Score:2)
"Even then #ifdefs are the wrong way to do it. Create a system abstraction layer (or use one of the several excellent ones that exist) and call that. Then for each platform build and link the appropriate implementation of the abstraction layer. "
Sorry, I disagree. Abstraction layers are inefficient and add to bloat especially if the code only differentiates in a few places between platforms. I'm sure they look nice on a whiteboard design but in the real world they're rarely the best solution for home grown code.
Bah. Well-designed abstraction layers have no significant overhead. I've designed and built many of them.
Not compatible with my Nexus 5 (Lollipop 5.1) (Score:3)
... Oddly enough. At least, that's what the Play Store says. Maybe some other restriction in place.
Re: (Score:2)
C++ for Android is an interesting challenge, because there are multiple processor types out there. Although a Nexus 5 is pretty close to a reference platform.
Re: (Score:2)
Re: (Score:2)
Google's own documentation suggests that running native code isn't really a problem, and just use JNI to handle the interface.
Re: (Score:3)
C++ for Android is an interesting challenge, because there are multiple processor types out there.
Remember when Apple was shipping MacOS for both Intel and PPC processors? C++ programs worked just fine. There's not much in computer science that hasn't already been solved.
Re: (Score:3)
The NP problem sets would like to have a word with you.
Re: (Score:2)
According to the Play Store, it allows me to install it on all my Lollipop devices:
My T-Mobile LG G2, my Sony Xperia Z Ultra, and my Nexus 9.
May be, they're doing a staged rollout [android.com] thing. Staged rollouts are a good idea from a technical perspective. The marketing department hates them, but on a popular app they can avoid you thousands of negative ratings/reviews because there is always someone, whether it's an impatient higher up or an impatient developer, that tries to make one tiny little change to the fin
Translation (Score:2)
Somewhat unusually for a new app, the bulk of it is built in the venerable C++ language, because the main guys on the team were big C++ fans who found a way to justify their preference.
Not saying it was the wrong choice, particularly for the team in question, but I'm betting if you hand the project to another team you come up with a different language.
Also interesting is it sounds like they're using an automatic code generator to translate some of the stuff from C++ to Java to run on android, maybe it will
Re: (Score:2)
I suspect it is more likely that they are using a critical library that is easier to code around than to reimplement in another language.
Re: (Score:2)
Maybe so, but C++ is actually a smart way to go if you need to write cross-platform code, especially now that C++ 11/14 has fixed a lot of the most troublesome and problem-prone aspects of the language. Other than C#/Xamarin, I can't think of another language that would be easily portable across all platforms, and C++ certainly has a performance edge for any sort of heavy lifting that has to be done on the client.
C++ compiles natively on Android, so I *suspect* they're using that translation to automatical
Re: (Score:2)
What's your opinion of C#/Xamarin for cross-platform apps that don't require a lot of client-side heavy lifting?
I have no experience with it specifically (so take my advice with a grain of salt), but I do have quite a bit of C# experience. I think it's a pretty clean, readable language for the most part, so I certainly wouldn't be opposed to going that direction if I had a project that could make use of it. My feeling is that programmers are more likely to be more productive writing C# than C++. Personally, (I'm a videogame developer) I write all my game development tools in C#, while my game and engine code are C
You've been given a facial (Score:2, Insightful)
We could call it 'getting facefucked' and the cameras could now squirt semen in people's face to complete the experience.
Re: (Score:2)
We could call it 'getting facefucked'
Imagine the fun that you'd have googling for that!
C++ makes sense here (Score:4, Interesting)
C++ is so flexible that you can write all your nasty "legwork" code (performance-sensitive stuff, like the actual facial recognition, image data manipulation, etc.) *once* and call it from whatever UI layer you write.
Granted, it's probably somewhere between hard and impossible to write a mobile platform-agnostic UI layer that actually looks good on both Android and iOS, since iOS and Android are so different in that regard; but even if they didn't bother doing that and just wrote two entirely separate view layers, they still can separate out all the heavy lifting and "write once, compile in two places". Both Android and iOS have decent to good C++ support, so if you make it platform-independent, you can have an optimized core library that works on the two major mobile platforms with no modifications.
Not sure I would go with C++ for something that was less performance-sensitive, but in this case, they can probably peg the CPU of a modern smartphone for at least a good fraction of a second with some of their heavier code.
Unless of course they are simply taking the image and uploading it to "the cloud" to do the facial recognition, in which case it's kind of a head-scratcher, since you don't need C++ to make HTTP requests.
LOL (Score:5, Insightful)
On what planet is C++ an unusual choice?
Re: (Score:3, Funny)
Planet script-kiddy.
Re:LOL (Score:5, Funny)
Neptune. Software written in C++ on Neptune would be very unusual.
Re: (Score:2)
Re: (Score:2)
Yeah, I'd imagine most software on Neptune is written in plain old C. Maybe Assembler, given how long it takes a probe to get there.
On Planet Millenial (Score:5, Funny)
The smart ones only know java , the rest think HTML +CSS are programming languages and javascript is the domain of almost omnipotent god like beings whose radiance they can only begin to emulate.
Re: (Score:2)
The smart ones only know java
Years ago, Slashdot used to disparage the kiddies who used Java.
Re: (Score:3)
Today, the inmates run the asylum.
Re: (Score:2)
Today, Slashdot disparages narcc for not understanding "damning with faint praise" when he reads it.
Re: (Score:2)
Mobile code, you idiot, which is what we are talking about here. There's a thing called "context" which is important when talking with anyone who is not yourself, and you should learn all about it.
Awesome, where do I start? (Score:2, Interesting)
I'm completely ignoring the "Facebook" part of this announcement. What's news to me is that (most of) an app on any mobile platform can actually be written in C++ instead of Java or Swift. I quite seriously had no idea this could be done. The few times I've dabbled in Android development, for example, absolutely everything centered around Java. I've never played with iOS development because I don't have a suitable device, but I assumed you had to go with Objective C or Swift.
Where do I get started building
Re: (Score:2)
There has never been any problem with integrating C code in Mac OS X or iOS.
Re: (Score:2)
Did you mean C++, which is what GP was talking about, or stating a completely unrelated fact? Because Wikipedia supports either interpretation - I'm just concerned that you might be having a stroke and need help.
Qt for Android (Score:5, Interesting)
Where do I get started building Android apps in C++? Inquiring minds suddenly want to know.
The latest versions of Qt5 support building Qt/C++ apps for Android and iOS. I've never tried it for more than running a few examples, but it seems pretty nice and easy, and I've really enjoyed Qt development for years now.
Re: (Score:2)
Re: (Score:2)
Mobile apps since before iOS and Android (Score:2)
What's news to me is that (most of) an app on any mobile platform can actually be written in C++
What do you think games for Nintendo DS, PlayStation Portable, Nintendo 3DS, and PlayStation Vita are written in?
C++ is best choice for many applications (Score:3, Interesting)
Anything that has to be shipped outside your own organisation really has to be written in C++.
Look at the alternatives for commercial development of retail applications:
- Java - no good gui toolkits, resource hungry and bad latency. It is _possible_ to use, but never seems to be as performant as a native choice. Requires JVM. Contaminated and effectively dead as a platform as a result of Oracle's extremely, extremely, extremely extreme view on API copyrights, so not an option in my company any more sadly. Oracle really scared our lawyers, however crazy us technical people consider Oracle management to be, and however unlikely they are to prevail. SWT was the best toolkit I used for java GUIs. Definitely shippable.
- C#/.NET - no portable choices for GUI toolkits. Shipping a binary mono that works everywhere is tricky on Linux due to dependencies on GTK. No acceptable portable UI toolkit. Winforms kind of works, but it actually rather clunky and nasty. My impression is that it performs better than java, I guess because we ahead of time compiled everything we built with it mostly.
- C++ - Qt, GTK, wxWidgets all work as commercially supportable toolkits. I have shipped Qt apps. The best GUI toolkit I have used on any platform, when used properly. Dependencies in C++ are simple and easy to manage. C++14 also offers a never nice improvement over C++98 - almost like a whole new language. The traditional reasons for avoiding C++ are gone. Sure, it may be a mental burden to less competent developers to learn properly, but do you want to employ incompetents anyway?
Of course, developing internal software, that doesn't need to be packaged and shipped on all customer's Linux and Windows is a completely different world.
In this world, I would probably go with a mixture of C++ and C#, depending on project requirements.
"Venerable"? (Score:2)
C++ is "Venerable"? Based on its first standard version, it is 17 years old. Seriously, we set the bar of language decrepitude at only 17 years?
I might might let it slide if you used that adjective for C or something even older. But C++ has only just now gone through enough revisions to start getting halfway decent. You wanna just chuck it in the retirement home right when they are starting to get some of the kinks worked out? One or two more revisions and they were going to get it up to the capabilities o
Re: (Score:2)
I learned C++ in 1987. The original Stroustrup book came out in 1985, so more like 30 years old.
Re: (Score:2)
The original start date is quite debatable. Some argue back even further (like '79!). Its complicated because C++ had an unusually long development period. Personally I don't really consider anything prior to C++ "2.0" (1991) to be anything more than an experimental waypoint in the development of the language. After that you can start making arguments, but I still don't put it before the first true compilers (not precompilers) became widely available and a lot of people starting using it for serious project
Re: (Score:2)
1998 may be a "convenient" mile post but it doesn't reflect reality. There was a lot of large scale development going on in C++ in the early & mid-90's. By your measurement, C++ is younger than Java!
Re: (Score:2)
"Venerable" does not quite mean "decrepit". The meaning is more like respect for an elder. "Official standard" or not, it has been around as a real language since the early 90s (Borland?), which definitely makes it an elder in computer land. I mean, Windows is written in C++ and it definitely gets the "venerable" title by now.
Re: (Score:2)
You realize venerable is a positive word, right? It implies age, sure, but the point of it is "respected" not "decrepit" or "ready to retire".
Re: (Score:2)
Yeah. I worked with pre-standard C++ and standard C++. Even if we're just talking about C++98, I vastly prefer the standard version. Push that forward to 2011 and 2014 and the language is far better yet.
And the news is? (Score:4, Interesting)
Facebook has some actually competent coders that do not need to be coddled and do not start to cry if the language they use requires some actual understanding?
The most cross-platform is C (Score:3)
Seriously, if you want to write something that works in any platform, write it in C, C++ is a second but still valid choice.
When people design a platform, one of the first thing they do make it run code written in C. It is also the language of choice for everything UNIX : Linux, BSD, GNU, etc... It is well standardized too : sure, it is easy to shoot yourself in the foot but if you code properly, it should work on any platform. And as an added bonus, good C code is also valid C++ and ObjC.
Re: (Score:2)
Actually, C is indeed awesome for cross-platform compilability; however, try using libraries cross-platform. Nastiness.
For example, the crypt() function. Call it under Linux and call it under OpenBSD and see how that works out for you. Yes, it is possible. I am not even sure that is available in Windows.
Pure, ANSI standard C will compile under any platform. It is the details (libs) that kill you.
Re: (Score:2)
When people design a platform, one of the first thing they do is make it run code written in C.
Only a limited subset of platforms can run Java, but everything can run C.
Re: (Score:2)
If you have a C or C++ compiler, it will compile to native code on whatever system you're using. You do need to be able to compile to that, but the array of systems that C and C++ compilers address is vast (particularly C). Languages called "cross-platform" typically require their own platform, often a virtual machine. This isn't necessarily obvious. You can compile a Python program to a .pyc file, but it isn't native code.
The platform in question may be available on all the systems you're considerin
The details are interesting (Score:5, Informative)
As probably many others, I've been looking into this exact problem for a while, comparing a lot of available options. Ultimately, I want something to run on Android, iOS, Windows (+ Phone), Linux, and OS X. The very complex core logic should be a write-once affair, while not having a single shared UI is not such a major issue, nor is writing some platform-specific utility classes. I have also come to the conclusion that C++11 for that core is the most viable option.
Some interesting tidbits not mentioned in the summary is that they used DropBox's djinni [github.com] to generate C++, ObjC and Java bindings; and they used the Flux [github.io] unidirectional data flow architecture. Both of these things are worth reading about, more so than any thing that is actually mentioned in the summary.
C and family = optimal (Score:2)
There's yet to be a single language that can compete with that language group for speed, capability and power of the resulting code (providing it's relatively bug-free) It's a higher cost of production for a better quality result.
While occasionally a really well-tuned script language can match it for capability (perl succeeded there) - usually they cannot.
And anyone who cal
Re: (Score:2)
Venerable is not a bad thing.
1970s? (Score:2)
Initially developed in the late 1970s, C++ is a powerful general-purpose programming language, and is still widely used for writing mission critical and performance-sensitive applications.
Hardly. Stroustrup first introduced C with classes at Bell Labs in 1979. It wouldn't be known as C++ until at least 1983.
Re: (Score:2)
Hardly. Stroustrup first introduced C with classes at Bell Labs in 1979. It wouldn't be known as C++ until at least 1983.
While related and mostly compatible, C and C++ are different languages.
I dumped Objective-C and haven't looked back. (Score:2)
About the only
Re: (Score:3)
>> modern certification mills
If you try to put someone who doesn't already understand a half-dozen languages (and can pick up others in days) in an "auditing" position, you pretty much deserve what you're about to get.
Re: (Score:2)
Only to people who don't know what the fuck they're talking about ;-)
I believe that was exactly the implication the GP was making.
Re: (Score:3)
In fact, that 'certain amount' is so large that you actually need a KoolAidFactoryManagerHelperFactoryBuilder.
Re: (Score:3)
With modern certification mills cranking out millions of Java and .Net and Framework and Node.js and Shiny chimps, they've essentially guaranteed that it's unauditable by anyone not on a short list. +1 to you, Facebook.
Agreed. People on the short bus shouldn't be doing code audits. Leave the real programming to grown-ups.
Re: (Score:2)
...they've essentially guaranteed that it's unauditable by anyone not on a short list. +1 to you, Facebook.
There must be some confusion on your part.
This is not an open source project and this is not a web site. Any app they make that takes advantage of the native functionality of the camera is most likely going to be in a black box, whatever language they choose.
And one would think that Facebook hired enough developers that can program in C++ to have proper code reviews.
Re:C++ (Score:5, Insightful)
If C++ is "the best tool" for cross-platform mobile app development, then the state of mobile app development is in a sorry state indeed.
Seriously if C++ is the best we can do for *anything*, then we need to just throw in the towel and go back to pencil and paper right now.
Taking such a strident and dogmatically absolutist stance on the usefulness of any language indicates a lack of experience in the field and a narrowness of understanding of the field. It sounds like someone told you it was really, really bad, and, knowing nothing else, you simply repeat what they said.
C++ is, syntactically, not my favorite language. It's not even my second favorite language. But for its breadth of application, the ubiquity of compilers on any platform, and the sheer volume of useable libraries, it is up there on my list.
Re: (Score:2)
"the best we can do" (Score:2)
Take away its heritage advantages (libraries and compilers-- "it's popular for being popular"), and you are left with what exactly?
Let's see, you have almost-foolproof C compatibility... except most other languages can link to C code. Annnnnd... hmm. I can't really think of anything else. High perfor
Re: (Score:2)
What do you have left? An immensely expressive language that can be compiled to be screamingly fast. It's pretty easy to learn to use (although a lot harder to reliably understand older code). Many libraries depend heavily on C++ templates and overloading to present themselves in an easy-to-use manner. You don't want just anybody working on code like that, but you can have just anybody using it once written. Use it with a disciplined style and you avoid all sorts of problems C is prone to, at little o
Re: (Score:3)
An ideal solution solution would be to have a cross platform higher level language, and to just use C++ for it's intended use on these platforms which is primarily just computation or providing access to an existing library, not driving the actual logic of the overall app.
In software development, you never get to use the "ideal solution" because it invariably, as exemplified by this case, doesn't exist. The "best tool for the job" is always a local optimum.
Re: (Score:2)
Now such thing as an ideal solution.
As you point out c/c++ is often the best for the job.
People forget about things like IDEs, compilers, debuggers, and libraries.
Re: (Score:2)
Yes it is. Well-written C++ code will run on any platform, whereas even the best java code only runs on the java platform. This makes C++ much more suitable for cross platform development than java.
I have another way of looking at the same point........C is the most portable language, because if you write a library in C, it can be used from any language. Java, Python, TCL, Perl, Pascal, Fortran, C#, R, Javascript, D, Go, Ocaml, PHP, etc can all call into a C library (and a lot of the interfaces can be built automatically [swig.org]). If you write in Java, you're stuck building on top of it in Java.
Re: (Score:3)
C++ vs paper and pencil (Score:2)
Seriously if C++ is the best we can do for *anything*, then we need to just throw in the towel and go back to pencil and paper right now.
Sometime, "pencil and paper" *are* the best tool for the job, because they work everywhere.
Same for C++:
It's maybe not Dart (for Google Chrome), nor Rust (for Firefox), nor Swift (latest gen iOS), nor whatever is the latest cool thing (scala ?) to run on a Java machine (for Android), nor Ruby (is that the lastest hipster thingy on servers ?)
But it works everywhere. Thus there *are* legitimate solution were using the older or simpler tool is better than all the modern hyped bells and whistles.
Re: (Score:2)
This.
But, politely of course and stuff.
Re: (Score:2)
If you write C++, you may find it worthwhile to write the abstractions yourself, and not worry too much about low level operations once you've done that. Of course, writing the abstractions requires a lot more knowledge, skill, and time than just using them.