Steven Troughton-Smith has been looking into the how and what behind Microsoft’s ability to compile Objective-C code for Windows 10, and the history of it all is interesting. It turns out that Microsoft’s current implementation was initially developed by a company called Inception Mobile for BlackBerryOS 10. It took iOS Objective-C and converted as much as possible to Java or C++, hooking into the native platform APIs. It still works similarly on Windows 10.
After trying to woo BlackBerry, Inception Mobile tried to shop it around to Samsung for its Tizen platform. The audio file of the company’s presentation at the Tizen Developer Conference 2013 is still available, too.
Eventually, as we know now, Inception Mobile was acquired by Microsoft, and its co-founder Salmaan Ahmed ended up at Microsoft. And lo and behold: Ahmed was a speaker at this year’s Build conference, under the title “Compiling Objective-C Using the Visual Studio 2015 C++ Code Generation that Builds Windows, SQL, .Net, and Office“.
In other words, this technology has been in development for a long time, and looking at the slides and listening to the presentation from the past few years indicates that the technology was platform-agnostic, working on BlackBerryOS, Tizen, Android, and now Windows.
Very interesting. Apparently BlackBerry and Samsung saw no real value in this technology – at least, not enough to acquire it or include it in their platforms, whereas Microsoft jumped on it and turned it into a big deal for Windows 10.
This company, making a U-turn from its (troubled) past, is starting to become relevant again. Nice job, Nadella.
Not wanting to nitpick… But they are trying to become relevant again. They are very, very far from succeeding at this point (on mobile anyway).
I personally don’t think this particular parlor trick of being able to compile apps targeting iOS will end up amounting to anything. It is a neat trick certainly (assuming of course it turns out to actually works well), but I don’t think it will make much difference to be honest.
Windows Phone is sitting at <4% marketshare in the US. They do a bit better in some regional markets in Europe, but even there MS seeing double digits at all is very rare. Globally, it is a disaster (~2%) – even Symbian and Java ME both have larger marketshare right now.
Point is while I’m sure there will at least be a few developers that bother (if for no other reason than curiosity), there is still no financial incentive to support Windows Phone for them. Most just won’t care. MS has to gain some significant marketshare before that will happen…
Being able to run Android apps as is, on the other hand, that might be useful. At least that theoretically doesn’t require cooperation from the developer. Question is how do those apps get on the phones? Will you be able to sideload them? Will you be able to access some of the existing Android app stores?
If the answer is no, and the developers have to put their Android apps in the Windows store… Nope, not going to help them sell more phones. Same problem, no incentive. Although I suspect they will have somewhat better luck than with iOS developers…
Anyway, this all reminds me of OS/2. IBM built an OS so good at running Windows apps that no one bothered to write OS/2 apps… That didn’t turn out so well in the long run.
Dunno. How’s that worked out for Blackberry?
Well it has kept them (barely?) in business so far… Honestly think they would be road kill at this point without it. I know a few people with BB phones, without the Android apps they wouldn’t really have much to run on them.
But yeah, I think we agree on the overall point. This is not something to be congratulating MS about. Capitulation is not a winning strategy, and this is capitulation. I just don’t get some of the stories I have read proclaiming this is a sign of “The New Microsoft”. To me this is a sign of the Microsoft that has given up hope…
I never gave them much of a chance in mobile, so I’m definitely not impartial. Still, I preferred when they were trying to formulate strategies for winning, not strategies for surviving. Maybe I’m wrong, maybe it will work somehow – but I just don’t see it happening.
Agreed. Technically impressive, strategically questionable.
They never dropped below 85% marketshare on the desktop and was thus never “not relevant”.
Idiotic claim.
The Blackberry desktop or the Tizen desktop, Mr. Claim?
The desktop is now significantly less than 50% of mainstream computing.
It’s still a massive market, all the desktops and laptops in the world. To say MS is irrelevant is short sighted.
Objective-C is obsolete technology, born in the late 80’s and even then not really on the money. C and object oriented programming?? Wake up! Look at the monster of C++
Even Apple has moved on to Swift albeit a bit late.
I think it was in the mid-80s, because it was developed at the same time as C++. But yeah, there is a reason C++ won. Objective-C isn’t as much obsolete as it is just the clearly inferior technology.
It seems to me both Objective-C and C++ are ugly boltons to C, if you want to program in an OOP, it doesn’t make sense to chose a language that it largely rooted in a procedural way of operating.
I have programmed in C++ and never in Objective-C. But when I see code examples between the two, it strikes me that Objective-C is a lot more elegant than C++.
Languages don’t win because they are ‘better’ but it has more to do with who’s pushing it. Who would ever guess we would be programming in VB3 and VB6 for while?
C++ syntax works better with C. Objective-C looks like shit, not because the Objective-C parts are that bad, but because they clash with C syntax which is also there.
Compare ObjC:
[[myObject myProperty] setValue:@”string”]
With C++:
myObject->myProperty.setValue(“string”)
And C:
myObject->myProperty.value = “string”
The Obj-C would be:
myObject.myProperty.value = @”string”;
The C++ version would also be that, but without the ‘@’.
But they doesn’t do the same thing.
The object orientation of Objective-C isn’t the same as the object orientation of C++. They come from separate sources and have different philosophies.
And you ignore the fact that the current standard isn’t Objective-C but rather Objective-C++. So you can use standard C++ syntax.
IMO The main problem with C++ is that it has created a few generations of programmers who don’t actually grasp object orientation but think they do, because their C++ code compiles.
Edited 2015-05-03 20:20 UTC
That’s because OO is nasty all around. OO has created generations of programmers who mistake OO cargo cult practices as design.
I wish the problem with C++ was regarding object orientation. I personally think C++ would have benefited immensely if its designers would have bothered to actually understand some of the good points of the OO “cargo cult.”
IMO the main issue with C++ is its atrocious orthogonality characteristics. I’ve used C++ almost daily for years, and still the language feels to me as if it sort of goes out of its way to make its users miss the point of OO.
Edited 2015-05-04 07:39 UTC
As they should. They should prefer generic code, not OO. Objects should remain small, limited and non-virtual abstract data types, nothing more.
I can’t tell if you’re being serious, or you’re just throwing a buzzword salad around just for the sake of being edgy…
I’m being serious. All code I write now uses templates and type deduction (and thus lambdas) heavily to hide complexity for the end user.
You should search Youtube for lectures by Sean Parent, who is the chief scientist at Adobe. I recommend his A9 lecture, especially if words like “stable_partition” don’t mean anything to you right now.
+1 , highly recommend: http://channel9.msdn.com/Events/GoingNative/2013/Inheritance-Is-The…
Uh? I’m still confused. I guess I’m just having a difficult time following your argument; first you rail against Object Orientation in general, then you present an arbitrary coding style dogma, and now you’re referring me to a guy from Adobe and an algorithm from the std library.
Anyhoo, my point is still the same: C++ makes it overly difficult to express object orientation. Whether OO itself is good or bad, in general, is an unrelated discussion to where I was coming from.
And my point is that your point is irrelevant to how C++ should be used.
As for “overly difficult”, you assert your point, but that’s all you do. So if you’re just going to assert your point without providing backing arguments, then I’m going to argue your point is irrelevant.
FWIW I was simply giving my own personal opinion regarding my perceived failings with C++; mainly that it does a poor job in approaching its procedural and OO aspects orthogonally. I simply restated it, because your replies gave me the impression you did not comprehend what I was getting at.
But if you feel you must keep bringing apples to my opinion about oranges, by all means…
And I restate that it does a “poor job” because it wasn’t supposed to be a full OO or full procedural language.
The fact that OO in itself is quite poor and that there’s no one standard of what a good OO language is means calling it a poor OO language means completely nothing.
The only one bringing apples is you.
The concept of “poor” means nothing if you don’t have a a universally agreed upon scale with “excellent” at the other end.
So… You agree with him and yet still try to position your opinion as contrary to his.
So… you have trouble reading entire things?
If you had bothered reading entire things, you would have known my argument is that C++ doesn’t actually do a poor job of OO because there’s no way to do a good job of OO.
Have you never come across the use-mention distinction? http://en.wikipedia.org/wiki/Use%E2%80%93mention_distin…
When someone uses a phrase by another person but puts quotes around it, it’s a mention.
My point was that the syntax style clashes.
The C++ line doesn’t do the same as the C line either. It calls a function that is possibly virtual. It was a comparison of styles.
If only the PHP devs would understand this…
(I guess) 70-80% of Windows7/8 userbase will soon be moving to Windows 10. When iOS apps are coming to Windows 10 (iPad games ported to Xbox One), people will buy them.
When people start buying apps for Windows desktop, they might as well take the next step: Buy a Windows Phone or Windows Tablet.
To be able to use Microsoft’s compiler to make apps that run virtually everywhere, that is Microsoft’s goal. There is jealousy when all the top programmers and managers use non-windows computers or choose to work elsewhere. This is a very important new way to produce apps. It is likely that as more apps are made this way we will see truly universal apps which run equally well on Mac, Linux, Android and windows, as well as IOS from a single codebase. This makes linux and android more useful by implication. This is a noble effort. Objective-C is hardly obsolete and will be supported by apple for decades to come. Like in a few short months Microsoft will have integrated swift as well.
Edited 2015-05-03 04:17 UTC
Nearly in 1989, NeXTSTEP did a demonstration to IBM workers, where they felt like being decade behind NeXTSTEP developments. Sorry, failed to find a quote, but I remember some IBM programmer stated that IBM must have a similar technology urgently. IIUC this was lead to creation of System Object Model in around 1991. There were different similar efforts in either solving fragile base class problem, eliminating need for recompilation (SGI Delta C++, Sun OBI) or object oriented high level features (CLOS, SmallTalk, Objective-C) at those times, and SOM designers made something that incorporated best features of everything ever maid (look “Release-to-Release Binary Compatibility” article). This is still true IMO. SOM was designed as language-agnostic, and for a long time it had no closely related language like Objective-C for Objective-C runtime. Eventually, something like this was produced, it was called Direct-to-SOM C++ (DTS C++).
If you are interested and have a Windows PC nearby, you can find fixpak 9 zip for IBM VisualAge C++ v3.5 for Windows, unpack it, launch separate command line, set SOMBASE=whereyouhaveunpacked\ibmcppw, run imbcppw\bin\somenv.bat and see Direct-to-SOM C++ in the action. Change directory to ibmcppw\samples\compiler\dts and run nmake clean, nmake, copy xhmain\dtsdll\mycls.dll .\ or set PATH to let exe locate dll, then run hhmain.exe. I have checked it on my Windows 8 x64, it still works.
Unfortunately, DTS C++ appeared too late, and IBM shut down SOM not so long after DTS C++ has appeared. The Internet Archived pages show big expectations from Java those days (1997 year), and even NeXT&Apple were so enthusiastic that they have ported TextEdit from Objective-C into Java in one of early YellowBoxes. Later Apple did a step back, and recent events like Microsoft’s C++/CX introduction are signs that so called managed code[1] did not fulfill expectations, and native programming still matters. However, at the time it became clear, everybody forgot about SOM. IBM shut down OS/2 and Apple shut down Copland (Mac OS Classic used SOM, and so would naturally be doing Copland), and SOM was replaced with Objective-C, not for technical advantages, but for NeXTSTEP’s large codebase being founded on Objective-C already. I am a proponent of taking Cocoa/GNUStep ecosystem and replacing Objective-C with SOM. I hope to get my hands on it when I won’t have to spend so much time on obtaining diploma. But who knows, maybe Microsoft will do it faster than me. Let them pick SOM.
[1] I usually assume managed code to be a code I can actually manage, like a coroutine or virtual fiber I can run and suspend, or a memory state I can save and load.
I remember SOM.
It was COM done right, with Smalltalk like meta programming capabilities.
If I am not mistaken it was also part of the Taligent/OpenDoc project.
Sadly it was too tied to OS/2 and shared its fate.
Regarding the native compilation, I welcome it.
Before Java went mainstream, other memory safe languages were compiled to native code (e.g. Ada, Modula-2,…), but to the new generations born after Java, memory safe meant VM based executions.
So having the iOS/Mac OS X focus on native languages, .NET going .NET Native, and Java focusing on AOT post Java 9 feels good.
The only thing I like about Microsoft is its experimental attitudes on languages. Now Microsoft is sort of like the old Xerox Parc of the programming language scene.
That’s great news and I do hope Microsoft will put it to good use, having all the experience they earned until now.
The Windows Phone story always puzzled me.
There are so many die hard .NET developers I know that actually prefer struggling with Xamarin or other decent .NET interpreters to make the code available on iOS and Android that could start building apps on Windows Phone first but that does never happen aside from a small hobby.
It’s not like Windows Phone is a mess, and this does come from someone who used Nexus devices for 4 years. Almost 90% of basic apps that I need to run on a phone are there and work decent enough.
The problem Microsoft has to fix is open up the Windows Phone development process. In its current state is not exactly an easy process (or as easy anyone can go around starting iOS or Android development).
Couple this with the very different UI logic that is on Windows Phone and you have the recipe of “disaster”.
As good or unique it is, unfortunately Microsoft was very late to the party and the only way they could “mix in” is by house standards.
Microsoft has been arguing in favor of Oracle against Google and the Java language API as being copyright protected. So, do they need any agreement/licenses to do what they are doing with iOS and Android? Or maybe they are just ignoring them for now.