roestava
Nowadays I see people wanting to change Ruby to be more like those other languages. Needless to say, Ruby is best when all of Ruby is available. Putting restrictions on it wouldn't begin to turn it into what some people want.
On the server-side, people can use all kinds of languages, with no restrictions on choices. That's why these languages can flourish. On the client-side we are more restricted. The industry gets to dictate what goes on the client-side more.
Sigh.
I'm trying to use Dart lately which compiles to Javascript. While it can seem a bit like Ruby in OO and dynamic typing, it's a world of difference in other regards. Languages like Ruby that can evolve while breaking backward compatibility have more chance to be useful out of the box.
All in all, you should run in checked mode for more feedback. The idea is that you get warnings when stuff is bad. When stuff is super bad you get runtime exception.
Dart is optimist and will give you warnings and let your code run until it cannot.
By being higher level Dart can work from a subset, keeping the surface area smaller as a result.
Based on my experience, I'd say that errors you get help you with learning about languages that make those errors evident. I learned about recursion before I learned about getting the compilers happy, for instance.
It's funny though that I can count Python as one of the languages that I've barely used and learned simply because I was never too fond of it.
Anyways. I think Ruby is a fine language as it resembles basic and doesn't demand ";" and parentheses, and it also has great OO support which helps with the documentation and even IDE support. With name completion, for example. Methods in Ruby are very straightforward and control-flow structures are plenty capable in Ruby. Not having to declare variables can also help, and Ruby does report some errors quite handily.
Cheers.
I must say that other users may well like it the other way, because when I used to browse for GTK themes on the http://gnome-look.org/ site, many of the new themes were cooler when they were darker...
BTW, I just found out the http://gnome-look.org/ itself is whiter and brighter. Oh the joy! Cheers.
JavaScript runtimes have kept on improving and with the V8/Node.JS combination have started taking over the server-side code.
With careful engineering, developers can get even further with just JavaScript the language. I wonder for instance whether using the Google Closure Tools can bring more gains there. Such tools help with checking the code for common pitfalls and the style guidelines also help a bunch. Plus, they might help with deployment, with the packaging for the specific program you've written so you don't need to package up all the library with it. Then you don't need to feel ashamed of making use of lots of library code, if only the part of it that you're using gets deployed.
Still, working with JavaScript directly can also bring debugging challenges, even more when you're trying to debug code that has been mangled since leaving your library source files.
Languages like CoffeeScript and Dart have success because the alternative in pure JavaScript is still quite painful, as I've mentioned above. It's a mistake to dismiss languages like CoffeeScript and Dart because you want that 50% extra performance.
Still, CoffeeScript is a concept. It could be said to have been over-engineered in places. Some of the stewards of JavaScript would have found it better if it was more like a JavaScript with JSLint turned on and some niceties on top of it.
Letting the market to select the tools you'll be using seems like a standard approach to most people.
Early adopters can be such trouble makers. All tools bring tradeoffs with them and many times early adopters don't anticipate them all.
A lot of years ago when I started with Ruby, one of the first things I cared about was how easy it was to write OO in Ruby. I like it perhaps even better in Dart. Ruby has features that Dart will never have, not to mention that once Dart is released it may stop evolving, whereas Ruby that has evolved so much will continue to do so.
Dart goes beyond what CoffeeScript offers. For instance, Dart can use a lot of library code and try to produce a final script that ships only the methods your program uses.
Dart has many parts to it. There's a Dart Editor that uses Eclipse as a foundation but actually strives to be a lightweight editor. The Dart compiler shipped with the Dart Editor is the more stable one in my experience, but it tends to produce scary JavaScript at the moment. If you tell it to produce "optimized" JavaScript it will try harder to make the final script smaller, but it isn't too pretty. The Editor will get some good debugging features soon.
Then there's a new compiler that's still being developed for Dart called Frog. It actually produces much more decent JavaScript code.
And there's a VM for Dart that's useful for testing and developing smaller scripts that can run without the browser. There's a promise that the VM will be integrated with a branch of the WebKit browser component which should help with making use of the VM in a browser environment. Maybe next week we'll get a first version of it. (I speak as a user.)
As they say, the sky is the limit. I'm excited and have written thousands of Dart code, much of which has been converting my JavaScript library code to Dart.
I find it amazing that "DRY" has become such a positive pattern when it was touted as one of the driving points of the Ruby on Rails framework. Don't repeat yourself.
For instance, Java folks are always ready to throw exceptions instead of letting stuff resolve itself if it doesn't quite work.
Ubuntu more than any other has tried a bit of everything. I've long settled on the Xfce version called Xubuntu. So after trying Unity for a couple of hours after installing the recent Ubuntu I could just install "xubuntu-desktop" and be done with it, back to my trusted experience.
Interestingly, many users seem to settle on the default experience and then feel cheated when it changes to something they don't like. Users coming from Windows found home in some version of Ubuntu. Then felt cheated when it changed some more.
Experienced users have all of this baggage, all the learning they have undergone... But the Linux distros namely Ubuntu want to try to make something for people who have barely used a computer, pushed by partners like Dell and so on.
Windows too has changed a lot throughout versions. The lucky ones kept on using Windows XP.
That sends me back to the Delphi days and I'm not too happy either. Because Delphi provided those kinds of features and we ended up losing it in favor of Java and .NET craziness.
The thing is, Go web apps start faster in the App Engine than web apps made with some of the other languages and also may take up fewer resources. That means that App Engine applications can be scaled up and down because spinning up new processes (with Go apps) is instant.
Here's an example:
$ cat hn.go && 8g hn.go && 8l -o hn hn.8 && time ./hn
package main
import "fmt"
func main(){
fmt.Println("Hello HN!");
}
Hello HN!
real 0m0.002s
user 0m0.000s
sys 0m0.000s
Cheers.You're set as you already use Eclipse. :-)
App Engine also supports Python and Java. I figure folks could use Xtend to write Java web apps that cut some of the boilerplate and perhaps even deploy to App Engine, for instance. Giving folks an alternative to going with Go as a static typed language.
Perhaps Xtend using Java source-code as an intermediate medium confuses people a little. Using Eclipse to program using Xtend/Java may just be too seamless for it not to matter much after you've grown used to it.
It started the JBoss process and at the end of it loaded my simple app. I tested it a little on the browser and ran the Apache benchmark tool on it like ab -n 1000 -c 10 http://127.0.0.1:8080/hello
After it had warmed up, further benchmark runs were much faster.
On my weak hardware, going up to 2.2k requests/second or something. I was like "wow! Give me more of that." Not really that it couldn't be matched by other technologies for that kind of stuff, but that it was a single process easily configured.
If we think that the same process could be shared by many other scripts, programs and so on, it's a good way to reuse all of that in innovative ways.
Deep down it's not much more than having a stable multi-threaded environment that you can rely on.
Then I thought: wait! When I started with Ruby, I was running from all of that kind of complexity!
It's as if we were being assimilated by Java again. Only this time we don't have to use so much Java or xml.
By embedding Ruby or Python within the Java Virtual Machine or the .NET CLR you start your program/library with a single process.
For instance, Ruby by default didn't have great concurrency so users ended up spawning more processes to handle amongst other things concurrency. JRuby's selling point is that you don't have to work with so many processes and you can instead rely on the battle-tested multithreading of the JVM. It opens up the chance for more bugs when using threads, but you do cut on the need to use so many processes.
Besides, scripting languages have always made it easier to string together a program for testing, managing and prototyping. Not only do you not need to spend time recompiling programs in scripting languages, but you also have more freedom regarding your code. Java for instance demands one class per file. With a scripting language, you can have as many as you want. With a scripting language you don't need a Makefile as it's easier to use just a few files to get your job done.
Now you could question the need to have so many different scripting languages. But you could also question the need to have so many different non-scripting languages as well.