Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Comment Re:Compatibility is no problem, before or after sw (Score 1) 636

There's nothing mysterious about it. The Apple compiler I think even lets you mix C++ and Objective-C in the one source file. You just write your business logic in C or C++ and call it from your gui code in objective-C. As long as your business logic is easily callable from a C interface, it isn't hard. Of course, mixing languages is always painful to some extent.

Comment Re:Good bye source compatibility (Score 1) 636

I don't see why QT can't support this. Swift and Objective-C objects map 1:1. Objective-C objects are just blobs of memory to other C-like languages. You'll be able to wrap all method calls with C wrappers.

Will it be easy? No. But it won't be any harder than it was with Objective-C. It's always hard to wrap an object framework with a foreign language.

As for Metro, I'd imagine it would be possible IF Microsoft allowed you to run non-Metro programs from their app store. I know nothing about it, but I suspect they might not. Would it be easy to wrap Metro? No, pretty hard. But it doesn't sound impossible. If there's a C interface, use that. If not, you feed method calls to the Metro engine as text strings.

Comment Re:Bjarne Stroustrup (Score 1) 636

Which frameworks? Cocoa in particular, but basically their entire OS-X stack.

The problem it solves is that Objective-C has its peculiarities: no garbage collection, named parameters, etc etc, and there aren't any other languages I can think of that are modern, full featured, and have those peculiarities. Without those peculiarities they'd have to rewrite Cocoa, and all their apps, and it wouldn't be easy for developers to make a slow transition.

Comment Re:What took them so long? (Score 1) 636

Yeah but MS hadn't redesigned their windows programming framework since the early 90s. They had to improve on a win32 C API that was truly awful. Apple on the other hand had its NeXT inspired gui framework which people actually LIKED. Nobody was really falling over themselves to throw it away, because it was pretty nice, even with all its faults.

Comment Re:Somebody post a SWIFT example PLEASE! (Score 1) 636

The reason why to create a new language is that the basic model of Objective-C needed to be retained for backwards compatibility. They tried to bolt garbage collection onto Objective-C, and I actually thought it was OK, but I gather they had a lot of problems, and it was buggy. Similarly, Objective-C assumes a lot of things about how objects work and stuff that you can't map precisely to any other language. A compromise, yes. But its never been easy for an OS to support any and every programming language. OSes and their native language tend to be pretty tightly integrated, unfortunately. But if you think the problems are so easy to overcome, feel free to integrate your favourite language on top. I think it won't be easy.

Comment Re:Somebody post a SWIFT example PLEASE! (Score 2, Insightful) 636

I haven't checked, but its a great idea to have override as a mandatory descriptor (If it is). Java now has @Override, but code quality suffers from it not being compulsory, leading later to subtle bugs. As for func and let, I imagine it makes it easier to make a scripting language to have less ambiguity about what you are trying to declare up front. I mean, without func, would the line "area()" be the start of a declaration, or a call to a function? Sure, you could wait for a semi-colon to finalise the decision, but then you've got to have semi-colons.

Slashdot Top Deals

"The four building blocks of the universe are fire, water, gravel and vinyl." -- Dave Barry

Working...