Google May Adopt Apple's Swift Programming Language For Android, Says Report (thenextweb.com)
An anonymous reader writes: Google has plans to make Apple's Swift object-oriented language a "first-class" language for Android, reports The Next Web. The publication, citing sources, adds that Google doesn't mean to replace the current first-class language for Android -- Java -- at least, "initially." Google sees an "upside" in using Swift, which Apple made open source last year. But a ton of things need to fall into place for this to work. From the report, "All told, Google would have to effectively recreate its efforts with Java -- for Swift. If the company is motivated enough, it's very possible to do so without compromising on its open source values or ruffling any developer feathers along the way." The company is also discussing internally about making Kotlin as a first-class language for Android. "Unlike Swift, Kotlin works with Android Studio, Google's IDE for Android development. Unfortunately, sources tell The Next Web that Google's current mindset is that Kotlin is a bit too slow when compiling."
Damn it Google, just pick a fucking language already and make it an option as an alternate to Javascript on the browser. Anything strongly typed and notably lacking in magic goddamn bullshit (Looking at YOU, Ruby) would be better than what we have now.
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
Damn it Google, just pick a fucking language already and make it an option as an alternate to Javascript on the browser.
I thought the trick for web browsers was to pick your own favorite fucking language, and compile it to JavaScript for deployment? Then every programmer can use whatever language he/she prefers, rather than everybody having to use the same language.
Of course, this article isn't about web browsers, it's about application development.
I don't care if it's 90,000 hectares. That lake was not my doing.
I would much prefer to see them go with Swift.
I've dabbled with both Swift and Kotlin, and the Swift community is a much nicer one to deal with. The Swift community is a lot like the Python and C# communities. They're friendly, not too opinionated, and when they are opinionated it's because they're right. If you have a problem, they'll help you out and everyone's happy. They aren't there to tell you what to do or how to do it. They just try to help you do what you want to do.
I've found the Kotlin community to be more like the Rust, Ruby and Nim communities. There is a lot of cockiness, and they're way too opinionated, especially when their opinions are factually wrong so often. If you don't do things their preferred way, even if their way is the worst way possible, well you can just fuck off and die as far as they're concerned.
Maybe the difference has to do with the age of the participants. Those working with Swift, Python and C# tend to be older, more mature and generally laid-back. Those working with upstart languages like Kotlin, Rust, Ruby and Nim tend to be young, angry, passive-aggressive, and perhaps impotent.
If I were developing for Android, I'd much rather deal with the Swift/C#/Python type of community than the Kotlin/Rust/Ruby/Nim type of community.
and be done with it. RemObjecs Elements compiles Swift/C#/Oxygene(Delphi-lile language) to ios/windows/java/mac.
Next year's announcement: as we've realized that Swift wasn't invented by Google, we're deciding to replace it with a new own in-house language that will sit beside Go, Dart, Angular, and the rest of our toys that suckers think will be godsends, until we've got 'em hooked and change how everything works again.
Next-next year's announcement: we're dropping support for the Internet, as we've realized that it wasn't invented by Google. We're making our own version, as in-house studies have shown that we can save ourselves some money, and nobody cares how much we fragment things anymore, because you're all happy to let us take control of everything.
I thought the trick for web browsers was to pick your own favorite fucking language, and compile it to JavaScript for deployment?
If you treat JavaScript as "machine language" to which the client side of a web application is transpiled, how does source-level debugging work?
I hope they don't intend to run Swift on their JVM.
What makes Swift so performant is that it lacks a tracing garbage collection. It only uses reference counting. Reference counting is a kind of garbage collection, but it doesn't by itself detect cycles. It's the cycle detection that is costly in languages like Java or Python (which uses reference counting along with a tracing collector for cycles.) People argue that cycle detection is cheap, especially in generational GCs. But the generational assumption presumes too much. Likewise when passing references between threads. Cross-generational (yet temporary) and cross-thread value passing can happen often. (See, e.g., MoarVMs problems.)
Plus, tracing collectors often need 2x RAM to be performant. Again, people wave away that requirement by arguing RAM is cheap and plentiful. But that assumption is broken all too often, as well, _especially_ on embedded devices.
So Swift offers both lower latency, more consistent latency, and requires fewer CPU and RAM resources. The cost is that you have manually break cycles, otherwise you'll leak memory. But tracing collectors don't fix all leaks, either. It's common to "leak" memory through caches. Some languages provide ephemerons (e.g. ephemeron tables in Lua), a special reference type that is more semantically powerful than, e.g., weak references, and provides the necessary hints to the tracing collector. But it's still something you must explicitly declare. And the Big-O complexity of ephemerons is pretty bad, so it can degrade performance significantly if there are lots of cycles passing through the ephemeron.
compile it to JavaScript for deployment
I have officially lived too long.
How can I believe you when you tell me what I don't want to hear?
Poorly.
The browser developer tools actually support source "map" files that allow you to step through the source - it's already used in the case where you concatenate and minify multiple javascript files into one
compile it to JavaScript
That word. I don't think it means what you think it means.
"Be particularly skeptical when presented with evidence confirming what you already believe." -
Google has put a ton of effort into Go, why not add that as a first class language as well?
I suppose Go/Java syntax are "close enough" at a high level. But kotlin? There are only so many ways to shuffle C & Pascal syntax before everyone is dazed and loses interest.
I think it actually does. At one point CDC was contemplating a machine that was going to use APL as the assembler language, to which other languages would need to compile if they were to run as native. So JavaScript can define a virtual machine that can be compiled to.
Now whether that's a good idea is a different question.
I think we've pushed this "anyone can grow up to be president" thing too far.
Dart from Google is pretty much that. We use it on several large client and server-side projects. It's worked spectacularly the past three years, but it does suffer from lack of focus from Google especially with regard to the test framework.
It becomes web scale.
Mod me down, my New Earth Global Warmingist friends!
perhaps there's a better term for this process?
Kludging
Webbing
Derping
Mod me down, my New Earth Global Warmingist friends!
On GNU/Linux, you can use whatever langage you want as long as it supports the C calling conventions, and most of them do. Same thing for oldschool Windows and pretty much every system running native code.
Why should a platform be tied to a particular language?
always a viable strategy if you're big enough...
Open sourcing Swift is looking like a bad move for Apple. They just allowed Google to take all the fruits of their development *for free!* Google doesn't have to spend resources to build it's own language and it removes a hurdle for iOS devs becoming Android devs. SMH.
Why do you hate YACC?
Not as bad as binary debugging. If you want to do js debuggingfor a higher level language, you have too much time on your hands.
Android Studio first.
All the open talk is so false.
You're an idiot. A compiler takes code written in one language and translates it in to code written in another language. That the source and target languages are typically a high-level language and a machine language is irrelevant.
Find yourself a copy of the dragon book. It's right there at the beginning.
Kids these days...
And it will continue to suffer. Google has essentially abandoned it like so many other silly projects. The only reason it gets any attention is the investment they moronically made in the language. It will continue to rot for a few more years before it becomes a distant memory to all but a few frustrated maintenance developers.
Never invest in a fad language. Particularly one from a company with a long history of abandoned projects. Especially a fad language intended to solve a minor problem with a popular mainstream language that introduces horrendous complexities and problems well over and above those caused by the minor problem the fad language was intended to eliminate.
You deserve everything you get.
Hold on.
Before I can parse your expression, I must first derp the statement into javascript.
Web scale, bitches!
Mod me down, my New Earth Global Warmingist friends!
The reality is just like the English dictionary for the English language, everyone needs a core computer dictionary for a core computer programming language around which schools can base computer education programs. So to facilitate teaching computer studies at earlier ages, more needs to be done to dump qwerty in favour of the ABCs (easier to teach children and adults should simply relearn), and better logical alignment of the English language and computer language and maths formulas and computer language formulas. At the very least a core language, a starter computer programming language that can taught all over the world, free of encumbrances, patents et al.
Chaos - everything, everywhere, everywhen
You are describing asm.js. It's scary, and amazing at the same time.
Transpiling to JavaScript is a decent crutch for those who prefer another language over JavaScript, but even with transpiling you cannot escape the semantics of the JavaScipt environment (barring writing a VM in JavaScript). The one major benefit that I have experienced in using TypeScript is that it enables some common mistakes to be caught at compile time, as well as better support for refactoring tools. The one drawback to working with Typescript that I've experienced is .d.ts files. DefinitelyTyped helps a lot, but I've found that they are typically just wrong enough that they cause more headache than they're worth for all but he most well-supported libraries.
Actually ... this is exactly how you use compiled. You compile C to an intermediate language (possible just a special type of ASM, but an intermediate language all the same.) You compile Java to Java Bytecode. So yes you can in fact compile C to Javascript. In the very long term, we could build a better safer intermediate language and compile everything to that.
If you treat JavaScript as "machine language" to which the client side of a web application is transpiled, how does source-level debugging work?
The same way it does for any language compiled into a machine language.
1. Google adopts Swift programming language! ...
2. iOS developers port their iPhone apps to Android!
3.
4. Profits!
Yes, it's a precompiler that translates the code to an intermediate state prior to its final state.
If you treat JavaScript as "machine language" to which the client side of a web application is transpiled, how does source-level debugging work?
The same way it does for any language compiled into a machine language.
So how do I attach, say, gdb to the JavaScript virtual machine of Firefox?
Or perhaps you did not mean "The same way" so literally. In that case, what would you describe as the same between debugging a program compiled to a machine language and debugging a program transpiled to JavaScript, and what would you describe as different?
I wrote that on my compilers midterm #1 and I got points taken off :(
When we got them back, my professor explained yeah that's what a compiler does but that's not the whole thing. Then he proceeded to tell us a story about how students raced to eat their lunch and one guy always won. But he wasn't a fast eater. Before they said go, he'd shout WAIT! and dump his mashed potatoes onto his plate, then the gravy, then the turkey, then the grapes and then pour milk all over it and stir it. Then he'd say he was ready and slurp it down. And that's what a compiler is supposed to do.
We must teach the following:
Some variant of BASIC for a first introduction
Shell environments (basic interaction) - BOTH Unix and Windows
C (basics)
Something like C++, C#, or Java... preferably all three
Common Lisp
Another high level language like Ruby, Python, etc
Something like F#, ML, Haskell
People are in school for a long time, plenty of time to build that up.
The OP needs to be upvoted. Source Maps is the correct answer.
Do you prefer transpile?
transpile
I have been developing on Swift for about 6 months now for a project. Today I discovered that in Swift 3, increment(++) and decrement(--) operators are being removed (as well as some other things). Our project isn't that big, so it won't take long to fix the 400 or so warnings that this has introduced, but it's probably causing real pain to anyone maintaining a larger code base. I like Swift, and am glad to hear its popularity is increasing so quickly, but I would like to see it stabilize.
d-_-b
It also can't interface with the dom
WebAssembly is on the way. Soon you'll be able to program in any language for the browser.
"First they came for the slanderers and i said nothing."
Everybody has to debug your web site?
Sleep your way to a whiter smile...date a dentist!
It's already open source and it already runs well on Android. What do they think they'll gain by doing a bunch of work to use Swift?
Compiler is a program that translates one language into another. I have no idea what a precompiler does, it compiles before it compiles?
Your professor had suffered a stroke and nobody noticed. He/she must have been on tenure. The professor was also most qualified to teaching compilers, because of the stroke. He probably also taught number theory or really deep axiomatic number theory. There You can babble nonsense and nobody notices.
Especially a fad language intended to solve a minor problem with a popular mainstream language that introduces horrendous complexities and problems well over and above those caused by the minor problem the fad language was intended to eliminate.
You deserve everything you get.
You pretty much described C++ and Rust at the same time.
His professor was the reincarnated Cantor.
"So long and thanks for all the fish."
I'd argue that they also need to learn the history of computing and networking as well as the physical components (how they actually work - physically) and the basics of safe hex. I'd say that those are just as essential as any use is at this point in time. A good grounding in real computer science should actually cover the science of computing, no? They should actually know that what they're using is a tool and, like all tools, it should be operated both with skill and safety. In order to do that, one needs to truly understand the reasons that things are the way they are.
Beyond that, or along side that, they could learn the software aspects that you're suggesting. However, learning to program is not learning computer science. Learning to program does have value but that would be greatly improved by actually having a healthy dose of computer science so that they can tie it all together. If we just want cheap code monkeys, we can go buy those. If we want people who are actually skilled, we have to teach that.
I think that one, without the other, is not nearly as valuable as both of them combined. Someone who understands what ring 0 is actually might understand why code that doesn't race is imperative. Someone who understands the history, will know what mistakes have been made and learn from them. Someone who has an understanding of the networking, how it physically works, might actually be able to code with security in mind. Someone who knows the actual physical aspects of memory will understand that buffer overruns are bad - and why. Then, they will know who, what, when, where and how they worked to avoid them. They'll understand what sanity checking actually means and why it's essential.
And those that can't? Well, someone's gotta work help desk, manage, and be QA.
"So long and thanks for all the fish."
It is like pre-heating. It heats before it heats.
Damn it Google, just pick a fucking language already ...
Really? In my experience, this is one activity that doesn't in itself require much in the way of language skills; others may have a different perspective, of course.
So essentially, You are saying that a browser will become a platform to distribute binaries? Because that's pretty much what You are suggesting.
Alternatively, You might mean that there will be a standard for the javascript VM, which is pointless because all browser vendors already interpret extisting standards however they want.
Basically, I might also write an interpreter for any language in javascript, so writing in $my_favorite_language is already not a problem. My problem is debugging, not writing.
And if they can't do any of those, they become UX designers.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
So essentially, You are saying that a browser will become a platform to distribute binaries? Because that's pretty much what You are suggesting.
Yes
(there will still be the HTML/CSS component which is not a binary)
"First they came for the slanderers and i said nothing."
LOL That's lower than even *I* was went.
"So long and thanks for all the fish."
We already had that. We had java applets, flash, activeX and probably some other garbage that I can't think of. Remember web-pages written only in flash? Because I do. Now You want to sell this crap again to me. The next great idea will be to create something that is essentially only a web browser with some rudimentary OS capabilities added to it, and sell that. So we will have a vm (browser) that runs bytecode (webassembly), which is exactly java, and with exactly the same problems as java. Oh wait, node.js.
All with the cruft of what is basically obfuscated javascript, with only one advantage: it runs faster. So now I can have ads load even faster.
Google has, how many languages that they developed themself available they can use?
But still they would pick a language, not developed themselves, but by a competitor.
And they would do this why? Because they didn't learn from the whole Java debacle?
On a long enough timeline, the survival rate for everyone drops to zero.
This has all the smell of a response to Microsoft's purchase of Xamarin. By extending their reach, Google is attempting to diminish the effect C# may have on their ecosystem.
I know that Go is being pitched as a systems language - but surely it would be easier for Google to do the work necessary to switch to Go and improve it than use Swift.
Based on my (brief) look at Swift it seems to me that they have tried to be too clever by half - throwing everything in to it. Love or hate Java, C, Go - they have the benefits of being clean and simple languages.
Python, Lua or even Javascript.
Not Object-C, not Swift, not whateva Apple craps out...
That way they can be sued by both Oracle and Apple
Good or not the idea is useful.
You want to write code to run in the browser but not in javascript.
Browsers support javascript.
Solution?
Is it a compiler? That is up for debate since I have seen programs that translate between pascal and c and they are called a translator.
I guess it comes down to how you define javascript is it a language or a vm? In the end it doesn't matter much since this is a tool that does something useful.
See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
It's being used correctly here.
Even a C compiler actually compiles to assembly before the assembler produces machine code. It's possible (though largely an obsolete skill) to edit the compiled assembly code before assembling it.
Not to mention all the modern languages that compile to bytecode for a runtime interpreter.
Compiling to javascript isn't conceptually any different.
By Google writing horrific Swift code they can help pollute the Swift community like they've done with the Java community.
In the 70s and 80s and 90s the stuff designed this way ran slow slow slow. And all the new similar designs still do compared to code compiled or assembled to run on the target processor.
Give me a safer C like what Rust appears to be. Something that produces fast native code, but prevents programmers from doing stupid stuff.
Let's not even get into the disaster that Javascript is in the browser: Download a tarball of Javascript and execute: What browser am I running in? If this is browser of version X run this pile of code instead of all these other special piles for other browsers with multiple versions.
C hasn't gone away because it continues to be the best tool we have for producing fast code.
Don't believe me? Write almost any program in both C and ??? (except assembler) then run them on the same platform. Compare.
Facebook is billions of individual "Skinner Boxes." And if you use it you are the pigeon!
Cannot unread: http://zaa.ch/jison/docs/
I do not agree with this statement. The Towelroot kernel vulnerability impacts some KitKat and all versions below - any app that is able to download a small binary and run it from a shell can obtain root privilege.
KitKat and below are over 50% of the Android ecosystem at the moment, and app privileges are dangerously weak there.
What's with companies inventing their own, superfluous, languages?
Simple: It's about control. By not using one of many available, non-company controlled free languages, you increase your stranglehold of "your" ecosystem, giving more options to abuse^Ddemonetise your customers.
So why would Google even consider using one such monster, when while being touted as having been open-sourced, its obviously under control of its competitor?
In the same way that you can do source-level debugging in C/C++, even though it get preprocessed. Coffeescript has features like this for source-level debugging in webbrowers.
Like all pain, suffering is a signal that something isn't right
So essentially, You are saying that a browser will become a platform to distribute binaries?
This has been the case for a very long time. If anything, I would argue the only reason why we've had JavaScript for so long is that there really haven't been other languages worth replacing it with until recently. Now, it is really feasible to use your server-side language as your client-side one as well.