Discussion on:
View:
Show:
I wonder if Scala would be usable to write Android apps. I imagine there would need to be an Eclipse plugin or something along those lines, but this would be huge for Android developers if it can work with Android.
Yep, you can develop in Scala to run on Dalvik. See here: http://www.infoworld.com/d/application-development/scala-the-android-programming-language-you-didnt-know-you-had-170999
"C# has been going down the same path, adding the same sorts of tricks to reduce verbosity (like type inference, auto properties, anonymous classes, closures, etc.), as well as adding functional programming techniques to simplify things in specific circumstances."
You make them sound like the same thing. To use Rich Hickey's terminology, the new features of C# tend to make things *easier* but not necessarily *simpler*. Reducing verbosity can be a worthy goal, but C# has accomplished this by piling on the features, which interact with each other poorly, if at all. The C# standard is now almost as long as the C++ standard! There are many words I could use to describe the situation, but "simple" is not one of them.
Compare Python, for example, which has also evolved to add properties, closures, etc., but during the same time period has removed old features which didn't pan out, or for which a better way was found, and has actually simplified its type system while making it more powerful. The downside of removing features, of course, is that you lose backwards compatibility of source code (though languages like C# can't and don't guarantee that, either, e.g., as everyone with a Tuple was reminded in 2010). The upside is that the language as a whole is genuinely simpler, and also more powerful: Python programs tend to be significantly shorter than similar C# programs.
Many languages other than Python share this trait, and it's not hard to find languages that are both simple and powerful. Clojure also runs on the JVM, and also has these "three major improvements", among many others. It's also far less complex than Scala. (Then again, it doesn't use curly-braces so it's obviously a terrible language that nobody should ever use.)
Based on a few years of experience writing each of Java, C#, and Python (among many other languages), and based on what I've read about Scala, I think you're absolutely correct that Scala is Java's C#. I don't think that's a good thing: everything I've heard about Scala is that it is insanely complex, especially its type system. Java might have started out as "simplicity, but no power", but someone looking to upgrade might not find "power, but no simplicity" to be very appealing, when there are several options available which offer both simplicity and power.
You make them sound like the same thing. To use Rich Hickey's terminology, the new features of C# tend to make things *easier* but not necessarily *simpler*. Reducing verbosity can be a worthy goal, but C# has accomplished this by piling on the features, which interact with each other poorly, if at all. The C# standard is now almost as long as the C++ standard! There are many words I could use to describe the situation, but "simple" is not one of them.
Compare Python, for example, which has also evolved to add properties, closures, etc., but during the same time period has removed old features which didn't pan out, or for which a better way was found, and has actually simplified its type system while making it more powerful. The downside of removing features, of course, is that you lose backwards compatibility of source code (though languages like C# can't and don't guarantee that, either, e.g., as everyone with a Tuple was reminded in 2010). The upside is that the language as a whole is genuinely simpler, and also more powerful: Python programs tend to be significantly shorter than similar C# programs.
Many languages other than Python share this trait, and it's not hard to find languages that are both simple and powerful. Clojure also runs on the JVM, and also has these "three major improvements", among many others. It's also far less complex than Scala. (Then again, it doesn't use curly-braces so it's obviously a terrible language that nobody should ever use.)
Based on a few years of experience writing each of Java, C#, and Python (among many other languages), and based on what I've read about Scala, I think you're absolutely correct that Scala is Java's C#. I don't think that's a good thing: everything I've heard about Scala is that it is insanely complex, especially its type system. Java might have started out as "simplicity, but no power", but someone looking to upgrade might not find "power, but no simplicity" to be very appealing, when there are several options available which offer both simplicity and power.
... leads me to see things like "map" as a way of making things "simpler", but the cost is that you need to force yourself to repeat the same patterns often enough that they are second nature. For someone encountering that kind of scenario rarely, I agree that it is not "easier" or even "simpler" by any means!
J.Ja
J.Ja
...I've also heard it executes slowly. I haven't programmed in it, but just what you've described here makes it sound similar to Groovy in some respects.
I wouldn' t say scala has a "fairly small learning curve", unless you have a solid background in Java and, specially, in functional programming...
From your article it seems like if it were a typesafe version of groovy...
There are a fair ammount of complex concepts you have to learn. I would advise everyone interested in the subject to have a look at the "Scala for impatients" book...
And in respect to performance, scala is (at least so far now) quite slower than java to compile (the compiler really does a lot of heavy stuff to make your life easier, indeed), but the runtime performance is almost on par with java...
saludos
sas
From your article it seems like if it were a typesafe version of groovy...
There are a fair ammount of complex concepts you have to learn. I would advise everyone interested in the subject to have a look at the "Scala for impatients" book...
And in respect to performance, scala is (at least so far now) quite slower than java to compile (the compiler really does a lot of heavy stuff to make your life easier, indeed), but the runtime performance is almost on par with java...
saludos
sas
Railo is an FOSS CFML runtime. Yeah I know... ppfft Coldfusion is dead... But CF has matured significantly over the years and has become a modern App framework. It is kind of like RoR and jQuery for Java. At its core Railo/CF is basically a big ass function and tag library for Java that takes care of 95% of a web developers chores with just a few lines of code. Imagine having the best of PHPclasses.org built into the language. And if at any time CF's built-in functions and tags cannot do what you want you can drop down into java or import Java libraries with a few lines of code.
Railo and CF is all about getting stuff done.
Railo and CF is all about getting stuff done.
I have been doing a lot of Java and currently work with Python, so a lot of boilerplate, braces are gone (at least for now). But my productivity has not rocketed. of course because I am still discovering Python, tools and framework but mainly because my (lack of) productivity is not so much related to these aspects. A lot of my time is lost taking care of user interface, persistence etc So at least for enterprise db-oriented application, I don't think the language does a big difference.
The fact that Scala code will run on top of Java, or Android/Dalvik VM, or .Net means it is now a great top platform to develop for (even if this requires installing a runtime support library on top of those base VMs).
May be it will run too in Flash/ActiveScript VM ?
The learning curve is probably not very high, but the new syntax and paradigms must first be understood. But what I like is how you transform a multithreaded design into a coordinated design with threadless "reactors" (working as fibers in a single thread) for event-driven applications.
I also like the automatic management of the thread pool and immediate creation of a thread pool working on multiprocessors and multicore CPUs. Great to scale.
This simple transform in Scala can certainly boost the performances.
But still a step is missing for complete convergence : threads or coordinated threadless reactors should work transparently across processors or even across hosts over a network (an API allowing to connect hosts that provide execution support, plus transparent support for internal transport of the code and coordination, tuned on networking performances and availability of hosts, could allow to create a giant computing grid where the smallest devices could still connect and use the most complex applications, by downloading only the code necessary for the best local performance instead of using remote execution; a code caching mechanism, and a security model for the code and data would expose the capabilities and data just needed for the device, and the source application server could delegate execution to as many other servers or devices that can connect to it).
Application: your smartphone or tablet uses the same application that is already installed and authorized on your home PC, which itself got it from Internet, before adding its own local data (not managed stritly locally but within a roamable user environment). This woudl mean the end of the concept of "local host". There would remain only a single network on which a user profile is connected (or accessible via a range of Internet or mobile routing solutions).
May be it will run too in Flash/ActiveScript VM ?
The learning curve is probably not very high, but the new syntax and paradigms must first be understood. But what I like is how you transform a multithreaded design into a coordinated design with threadless "reactors" (working as fibers in a single thread) for event-driven applications.
I also like the automatic management of the thread pool and immediate creation of a thread pool working on multiprocessors and multicore CPUs. Great to scale.
This simple transform in Scala can certainly boost the performances.
But still a step is missing for complete convergence : threads or coordinated threadless reactors should work transparently across processors or even across hosts over a network (an API allowing to connect hosts that provide execution support, plus transparent support for internal transport of the code and coordination, tuned on networking performances and availability of hosts, could allow to create a giant computing grid where the smallest devices could still connect and use the most complex applications, by downloading only the code necessary for the best local performance instead of using remote execution; a code caching mechanism, and a security model for the code and data would expose the capabilities and data just needed for the device, and the source application server could delegate execution to as many other servers or devices that can connect to it).
Application: your smartphone or tablet uses the same application that is already installed and authorized on your home PC, which itself got it from Internet, before adding its own local data (not managed stritly locally but within a roamable user environment). This woudl mean the end of the concept of "local host". There would remain only a single network on which a user profile is connected (or accessible via a range of Internet or mobile routing solutions).
We've been working with Scala from Java & .NET for about a year now at Tindr.co and it's actually been amazing. Developer productivity increase is the biggest thing that I've seen - we can create higher quality software faster using Scala than with anything else. In addition, the base quality of the software appears to be higher. The strict typing of the system catches more bugs at the compiler level and seems to create code that is easier to maintain.
One of the other things that we've seen is that people seem to enjoy working in Scala more than they did in Java - it's much more actual coding and much less XML and boilerplate.
One of the other things that we've seen is that people seem to enjoy working in Scala more than they did in Java - it's much more actual coding and much less XML and boilerplate.
Hey,
Nice piece of information provided . I wanted to ask a question
i am from Electronics background and the company i m placed in is an IT company as for now i have no other option i have to join this company only but the main problem is this that they work on java and i don't know anything about java. I want to learn java online so saw many videos and even searched and came across http://www.wiziq.com/course/12145-the-6-week-complete-java-primer-with-training-certificate but i dont know how it is going to work for me. If anybody has taken this course please let me know..
Nice piece of information provided . I wanted to ask a question
i am from Electronics background and the company i m placed in is an IT company as for now i have no other option i have to join this company only but the main problem is this that they work on java and i don't know anything about java. I want to learn java online so saw many videos and even searched and came across http://www.wiziq.com/course/12145-the-6-week-complete-java-primer-with-training-certificate but i dont know how it is going to work for me. If anybody has taken this course please let me know..
- Keyboard Shortcuts:
- Prev
- Next
- Toggle

































