What would make you change languages?

Discussions

News: What would make you change languages?

  1. What would make you change languages? (30 messages)

    A discussion with a, um, let's call him "rank and file" programmer today about Groovy brough up an interesting point about what characteristics other JVM-based languages would have to have to make someone change to them. Interesting thought - what would make *you* consider changing languages? Are closures enough? Functional programming paradigms? Duck typing? Language frameworks like Rails, or Django? Multithreading capabilities as Scala offers? What about the various languages makes them attractive? What would they have to have in order to make them dominant on the JVM platform?

    Threaded Messages (30)

  2. I say this everywhere, but syntax is important. I don't know what you consider a "rank and file" programmer to be, but when I'm working in a Java shop with 99% Java code, I appreciate a language that is relatively close to that syntax. It provides the easiest switch between all the legacy Java code that I'm inevitably working on, and the new code in (language X). It's become clear that closures are the most important, but not only that, but how easy they are to express. Take for instance a simple example myList.eachWithIndex { item, index ->    println "$index : $item" } If I had to add parens around the method arguments, add types to the closure parameters, and didn't have string interpolation, this would be a lot harder to read. Heck, I don't even like the fact that I have to use two characters between the closure's parameters and body. But you get my point; it's not just what the features are, but how easy they are to use in the language. Ruby seems to be a very "symbol-y" language, which (IMO) makes it harder to read. I can learn Python or Boo syntax in 5 minutes. C-style syntax has all been ingrained in us, and it is nice just because any language with that style is immediately understandable by 90% of programmers (even if they are 'rank and file' ones).
  3. I agree with this to a point. I'm just starting to look at Groovy, but it's hard to fathom doing "everything" in Groovy. Mostly because of the tooling and such I've already built up surrounding generic Java code. This is essentially much like the leap others make when switching from C to some higher level language. Where you write most of you code in said language, and utility, interface, or performance sensitive pieces in C. Same can be said with the modern Java scripting languages and Java, where Java becomes the utility or performance language. The detail there is simply that Java is not C, and it has MOST of what most folks want. I agree about the syntax issue tho, as most of the nits that folks have with Java, while many are runtime issues, manifest themselves as syntax issues. [code] myList.eachWithIndex { item, index -> println "$index : $item" } [/code] This is attractive not simply from it's block or closure mechanism, but because of the syntax that feature allows us. We can "do this" in pure Java (to a point) with anonymous classes, but the resulting code is simply horrible, so it's not a natural idiom. And while many have legitimate issues I think with Java generics, I think at the same time they enjoy being able to do: [code] for(Thing t : bunchOThings) { ... } [/code] Which came about as a side effect of generics. So, that's the thing. The Java now has so much of what other languages have had, even if not done in a spectacular fashion. I wish it had runtime dispatch and multi-methods, personally. But, many advanced idioms are expressible within the Java language or runtime library, tho many take some hoops and 3rd party libraries to express well. For example, Aspect oriented programming we take for granted now in many cases. Either through specific AO libraries, or through large frameworks (like Spring or modern JEE). Even though Java has no direct support for it, the mechanism is available, and with annotations it's actually not a terrible exposure mechanism. Many folks rely on AO techniques and don't even know they're using them today. The only real reason to leave Java today I think is if you want a more dynamic language. I have yet to play with Groovy, and I'm an old Common Lisp junkie, but I don't see dynamic languages as the panacea others do. I just don't think they work that well "in the large", so I don't see myself leaving Java for one for major coding. For scripting, sure (kind of difficult to avoid that actually). And as much as I like closures and the functional style, I'm not willing to really give up the rest of the language just to get it. But if I can do something akin to the "eachWithIndex" example above, I'd welcome it. But that's me.
  4. Hammer or screwdriver?[ Go to top ]

    I have just completed a job where Java and PROLOG code works side by side to meet the requirement. Simultaneously, I have been coding in VB and C/C++. A programming language is a tool. The important thing is to find the right language - the right tool - for the task at hand. I'm not really concerned with switching languages, just learning new ones. It's all grist for the mill and fun to boot, so I'm also learning Scala and Haskell. Bring 'em on! Why does this 'ultimate language' attitude/goal/argument prevail in our business? You can drive in a nail with a screwdriver, but a hammer is better, so why not use a hammer. (Frameworks and kits are also tools and the GWT is floating my boat right now. )
  5. Ruby seems to be a very "symbol-y" language, which (IMO) makes it harder to read. I can learn Python or Boo syntax in 5 minutes. C-style syntax has all been ingrained in us, and it is nice just because any language with that style is immediately understandable by 90% of programmers (even if they are 'rank and file' ones).
    Well put. Python was designed to be easy to learn and read. Guido created ABC which was a replacement for other learning languages. When Guido created Python he kept a lot of his research on ABC in the language design of Python, which is one of the reasons it is so clean looking. I find Groovy to be somewhat Python like with more of a Java flavor.
  6. Original post: http://www.jroller.com/RickHigh/entry/thanks_zed_btw_syntax_matters Follow with links to blogs which talk about post: http://www.jroller.com/RickHigh/entry/thanks_for_the_kind_words Discussion on JavaLobby about post: http://www.javalobby.org/java/forums/t105687.html InfoQ discussion about post: http://www.infoq.com/news/2008/01/sun_drop_jruby
  7. OK, now there are languages provide new ways for development. It's veeerry good. But why? Look, tire or layer in application developments, is just a normal consideration. Ooooh, Tier or Layer, not only in applications here!! Util now, all codes in source just bind to language. Why? No Tier, or NO Layer in language aspect. We can image, most of code should story our biz logics, something in our code should tell compiler do special action, such as replace {} pair with begin end pair, as you see, these staff not related to logics. And something else of code can tell system that let parallel run. So, the compiler is not compiler, it'a Controller. Yes, development controller. So, there would be more compiler plugins come out, but languages. Hey, wait, and blabla, File systems in OS, have the same problem. OS provids a core hardware file system, let someone else make a authorized file system, a crypted file system, or a compressed file system, or other style system. Hey, Look cpu development progress, AMD provide vm instructions, seems like a developed country, but os or core software just like China, a developing country:) Why not make a real change, just like reopen China?
  8. Simple, fun and beauty. Even after more than 20 years I still find programming fun. I started out as a FORTRAN programmer for the Dept. of the Navy. A few years later I switched to C; it was way more fun to write stuff in C than in FORTRAN and the programs were prettier. In graduate school I learned the most beautiful language ever, Scheme, from the best book on programming ever penned by the hand of man, Structure and Interpretation of Computer Programs. I would've happily spent the rest of my days writing Scheme but no one would pay me to do it. It turned out that people would pay me to write OO code in C++ which was much more fun than faking it in C. Of course it's even more fun in Java and Java is in its own way more elegant - attractive if not beautiful - than C++. While I don't think Ruby will win any beauty contests it is certainly more fun to build stuff on the web with it than it is with Java, hence the couple hundred dollars worth of Ruby books on my desk. Even though I've played with Erlang and am trying to learn to love Haskell I would still rather write Scheme any day of the week. If only I could pay the bills doing it.
  9. amen, to most of that. Well said.
    ..Even though I've played with Erlang and am trying to learn to love Haskell I would still rather write Scheme any day of the week. If only I could pay the bills doing it.
  10. I would've happily spent the rest of my days writing Scheme but no one would pay me to do it. It turned out that people would pay me to write OO code in C++ which was much more fun than faking it in C. Of course it's even more fun in Java and Java is in its own way more elegant - attractive if not beautiful - than C++.
    I would've happily spent the rest of my days writing Python, but no one would pay me to do it either (1998). I used to write utilities, code generators, reports, prototypes, database migration scripts, etc. with Python. I think I will use Groovy for such things now.
  11. It's more than just the beauty of the language though. Smalltalk has had all this stuff for over 20 years now but Smalltalk went nowhere while the late-to-the-party but practical Java kicked its butt. There are hundreds of languages out there but ultimately, if I can't get paid doing it, it's not of much use to me (except for just some fun goofing around). I think most people feel the same way. The language has to be acceptible to corps. Which means it has to do a lot more than just look pretty. People underestimate the value of Java being so portable but I can guarantee you that has had a huge effect on its success. Things like that are valuable to corps and few languages/platforms (which is what the JVM is) can actually do that in a substantial, and "real" way. Of course, the JVM has leveled the playing field somewhat. Generate the right bytecode and you're good-to-go. This opens the door for languages like groovy, jruby, and scala which not only gain the platform independence but also gain easy access to legacy Java code and the huge number of Java libraries. It's an interesting time. I think new languages based on existing language-oriented VM platforms have huge opportunities that they would never of had in the past. Throw in DSLs and you get a world where programmers are going to have to get used to the idea of knowing a lot more languages than they ever have in the past. All of this for the sake of making development easy of course. :)
  12. It's more than just the beauty of the language though. Smalltalk has had all this stuff for over 20 years now but Smalltalk went nowhere while the late-to-the-party but practical Java kicked its butt.
    I think Java kicked its butt more because of serendipity than any special feature of the language. Would be interested to hear the converse of this argument. I think the JVM came at the right time and made secure, web-based development easier than existing platforms and also, while arguable, made write-once doable. I really like that new languages are being targeted for the JVM and accepted by more of the community/enterprise. I'm hoping that after some explosion one or two become popular enough to possibly replace the creaking Java language as the dominant for new JVM-based development. By creaking I mean that many of the new syntax changes are actually making Java a bit trickier to learn and master. I wouldn't want to be starting from scratch and be trying to understand all the Generics stuff. If only they'd prune language features and libraries with each release. The more they mess with the Java language the more newer languages have an appeal.
  13. Smalltalk -->Ruby[ Go to top ]

    It's more than just the beauty of the language though. Smalltalk has had all this stuff for over 20 years now but Smalltalk went nowhere while the late-to-the-party but practical Java kicked its butt
    Yes, right. The Smalltalk folks were too elitist similar to the people from Apple. And then they weren't prepared when the Internet hype broke lose. But there is Ruby now. Many Smalltalk people change to Ruby, because it is build with similar ideas in mind as Smalltalk. Unhappily, the Ruby guys didn't learn from Smalltalk how important a well done IDE is for being productive and have fun... If I were the guys from Concom I would tale the IDE from Smalltalk and make a world class IDE for Ruby. And that thing would sell .. Cheers, Oliver
  14. Re: Smalltalk -->Ruby[ Go to top ]

    It's more than just the beauty of the language though. Smalltalk has had all this stuff for over 20 years now but Smalltalk went nowhere while the late-to-the-party but practical Java kicked its butt

    Yes, right. The Smalltalk folks were too elitist similar to the people from Apple. And then they weren't prepared when the Internet hype broke lose. But there is Ruby now. Many Smalltalk people change to Ruby, because it is build with similar ideas in mind as Smalltalk. Unhappily, the Ruby guys didn't learn from Smalltalk how important a well done IDE is for being productive and have fun... If I were the guys from Concom I would tale the IDE from Smalltalk and make a world class IDE for Ruby. And that thing would sell ..

    Cheers, Oliver
    It was less the internet what killed Smalltalk, the main problem was the entire Digitalk/Parcplace fiasko, I know quite a handful of companies who jumped ship after the the entire failed codebase merge (which according to rumors had more political than practical causes) Digitalk was big in the PC scene while killing off Digitalk killed of Parcplace in the end as well and Smalltalk ended up as nieche language. I could have taken the place Java now has, the timeframe was around 95-97, it didnĀ“t but less because the Smalltalk guys were too elite, it simply was that many companies noticed that they didnt have investment savety while staying on the smalltalk side!
  15. Comfort + speed + library[ Go to top ]

    When I taught myself Ruby, I was tempted to stay with it. Its high orthogonality, its uncompromising OO-ness and the guiding principle of least surprise make Ruby an amazingly pleasant language to code in. Lambda expressions (= closures?) certainly didn't hurt either. What completely destroyed Ruby in my eyes was the horrendous performance of its "main" implementation: Even a simple web app lacked the "snap" of similar apps in other languages. Just as Java found no mainstream acceptance until JVMs learned to precompile, Ruby will turn people off until it learns to run at decent speeds. This won't be easy if Ruby stays away from bastardizing its OO nature with native int types. Java also spoiled me with its enormous library. Apart from the Java library's kitchen-sink completeness, never underestimate the draw of a library that includes a tailor-made GUI framework. Solutions like TCL bolted on to Python simply don't yield the same warm feeling I got when I discovered I could build GUIs in a OO manner with nothing but the Java core distribution. In summary: * a clean and consistent language such as Ruby ** featuring attributes instead of getters and setters ** and generics and closures * but with good performance * and a huge library * including a GUI framework * with better GUI event handling * and an in-language alternative to XML would convert me in a New York minute.
  16. Re: Comfort + speed + library[ Go to top ]


    In summary:
    * a clean and consistent language such as Ruby
    ** featuring attributes instead of getters and setters
    ** and generics and closures
    * but with good performance
    * and a huge library
    * including a GUI framework
    * with better GUI event handling
    * and an in-language alternative to XML

    would convert me in a New York minute.
    You sound like a good candidate for Groovy. It doesn't have a huge library but you can use Java classes in Groovy as easily as you use them when coding Java.
  17. Scala - Everything but attributes[ Go to top ]

    Your wishlist is slmost complete with Scala, although it doesn't have attributes as nice as groovy. It has everything else though, runs as fast as java on the jvm, and has a few bells and whistles that you may not have ever seen before (like really powerful Case class matching and list comprehensions.) Artima is putting the first book out on it and it is worth a read even though it is in beta form (I'm not an Artima employee, I'm just loving Scala these days)
  18. Re: Comfort + speed + library[ Go to top ]

    Have you explored jRuby? I've heard rumors that it is faster than stand-alone ruby because of the JVM's goodness. For scripts it would be slower due to JVM startup but for apps that wouldn't matter. Can anyone point to performance metrics verifying my claim (or blasting it?)
  19. More benefit than the current one! (i.e more money!)
  20. I think this is a bizarre question. The reason people learn or switch languages (not design languages) is because they either want to read something in a particular language or they would need to commuicate with someone else in that language. Normally, you don't learn a language because it is shorter and more concise. If that were a real driver, we'll all be talking Esperanto! So, what would make me switch to, say Ruby, is if someone offers me an interesting Ruby project. Essentially the question is more, what does a language need for wide adoption, and given what you have today tool-and-framework wise for Java or C#, there is a tough call. The only languages that gained significant market share the last 5 or so years were JavaScript and Flash (ActionScript or whatever it is called), which had the unique selling proposition that it is the only language that allows you to manipulate a web page client side.
  21. Why can't programmers and Tech Organizations asking these and other questions about switching programming languages or which programming language is faster, better, sexier, etc. understand that we may never get to the Holy Grail of "One Programming Language for All Problem Domains". These questions are getting asked so often by people that should be considered smart, that you really wonder if they are smart. Programming Languages should be developer friendly, and this is usually a matter of preference as most developers understand C/C++/C# and Java style syntax. Also, the API Library set must be comprehensive enough to take care of most problem sets (i.e. Data Structures, Networking, Security, etc.). Ultimately, developers should learn to appreciate the fact that programing languages are like tools in a toolbox and you must be able to understand the functions, abilities and best use of your tools when you need to solve a problem. The same argument goes for programming frameworks. Making programming languages and platforms inter-operable is an attempt to make developers more productive as usually most developers just want to program in one language that they feel meets most of their daily needs without having to learn about every new programming language that hits the block without ever having a chance to master the one they use the most. It also allows for modules that were implemented in a language/ technology that was appropriate for that problem domain to inter-operate with other modules built using other technologies/languages. I think computer science education including online tutorials and articles, should aim to equip programming students/programmers to not only program in "A Programming Language", but also know how to make intelligent tool selection (i.e. declarative, functional, object, logic, frameworks, etc.) decisions that's most appropriate for the problems they are going to solve. It seems as if these forums clearly show that programmers and tech organizations aren't properly conditioned to understand these considerations.
  22. A discussion with a, um, let's call him "rank and file" programmer
    Since I am sure most people will not wade through the 58 comments on the blog entry.... The purpose of the blog entry was to vent at the constant pronouncements by the "Ruby Rulez, Java sucks!" crowd, and the Java is dead crowd. It was more of a long rant than a detailed language comparison. Like many developers, I believe in programming language choice. In fact in 1998, I wrote a series on programming languages that ran in the JVM for the JDJ (being an early adopter of Jython, I wrote a book on Jython as well). I am all about choice and learning new languages to broaden your skill set. Like many of you I am sure, I have been paid to program in C, C++, Java, Python, Perl, Delphi, and many more. In the enterprise language space, Ruby comes dead last. In the LAMP world, Ruby comes dead last. Out of languages that run in the JVM that people talk about (Scala, Jython, Groovy), Ruby comes dead last. Yet there was the constant Ruby cheer leading squad on Jroller which is what the post was really about. According the Tiobe report, Python was the fastest growing programming language last year. Python is the most used alternative programming language used in the JVM. Yet Sun supports JRuby not Groovy or Jython (which more people use). Why? (JRuby comes behind Groovy and Jython) The Groovy support in most IDEs (except for apparently IDEA) is not so great. Why not invest in the syntax that people use? (Groovy being more similar to Java.) Groovy seems like more of a sure bet than JRuby does. This is not to say I will never program in JRuby or Ruby or Scala or Haskell or whatever, just that they are not high on my priority list as I am quite busy doing, um, mere "rank and file" development. Java is doing quite well. Reports of Java's death have been greatly exagerated. I did quite a bit of functional programming with Python (I am no FP expert) and it made the code I wrote unreadable by everyone in the organization I was working for (yet terse and beautiful). No one would touch it. Why not add some of these great new language features in a common syntax so the unwashed masses (rank and file) can enjoy these new perls of wisdom? Pick a syntax that people actually like say Java syntax like Groovy did. If you only preach the sermon in Latin no one will undersand. :o) Groovy and Java are not academic curiosities. Java actually gets used in industry by rank and file developers.
  23. Groovy is Ruby done wrong[ Go to top ]

    People cheer Ruby because Ruby has done a lot of language things right. Groovy is a clone of Ruby where they messed up a lot of these things because they didn't "get" the original design. As a trivial example that should be well known to any language designer, they messed up the information hiding around methods/fields by making it necessary to add () to a method call. This makes refactoring between these change the code *for no good reason*. (This particular issue was carefully documented by Bertrand Meyer in "Object Oriented Software Cosntruction" the mid/late 80s). The other changes I've seen in Groovy has also mostly (all?) been "superficial improvement, underlying corruption". I believe this is why Ruby is receiving the cheers and Groovy is being ignored. I too was excited about Groovy to start with; it looked like a Ruby for the JVM, at a time when JRuby was dead and the standalone Ruby interpreter was slow as molasses. Then I looked more carefully at it, and they were trashing a lot of Ruby's goodness for what to me seemed like no reason. Now, with JRuby and Scala to take that niche for JVM and the standalone Ruby interpreter much faster than it was, Groovy seems pointless. Apologies for my harshness to those that develop Groovy - you seem like nice people that are generally competent, just not well-versed in the subtleties of language design, especially the type of subtlety done in Ruby. Eivind.
  24. Re: Groovy is Ruby done wrong[ Go to top ]

    As a trivial example that should be well known to any language designer, they messed up the information hiding around methods/fields by making it necessary to add () to a method call. This makes refactoring between these change the code *for no good reason*. (This particular issue was carefully documented by Bertrand Meyer in "Object Oriented Software Cosntruction" the mid/late 80s)..
    More details with a code sample and some references would be nice.
    RE: Job demmand and RE $$$
    Uh yeah! That is the best motivator.
  25. C style syntax[ Go to top ]

    The syntax that got "ingrained" in me first was Basic followed by Assembler. I guess we should have stayed there. Let's look at how easy and direct I can express the logic of my application in code and not at whether its looks the same as what I've already got.
  26. Re: C style syntax[ Go to top ]

    The syntax that got "ingrained" in me first was Basic followed by Assembler. I guess we should have stayed there.
    Let's look at how easy and direct I can express the logic of my application in code and not at whether its looks the same as what I've already got.
    Let me be clear. I have a special place in my heart for Ruby brought on by scores of Ruby teleevagelists on Jroller. If I had to choose, I would go for better Java integration and tool support for Groovy rather than focusing on JRuby. Groovy has all of the features of Ruby but in a more Java friendly syntax. Groovy is a JSR. Then I would pick Python via Jython since is it a) more popular b) more mature c) has all the features of JRuby d) already most popular alternative language on the JVM besides Java (has been most popular alternative language for 10 years!) Then I would pick Scala since it provides great langague feature that are not found anywhere else and it augments what Java bring to the table. Then I would pick Ecmacscript 4 via the next Rhino since it is a) more popular b) people actually use it c) it has great langague features in a very commonly used syntax d) looks a lot closer to Java than traditional JavaScript did e) looks a lot like ActionScript/Flex. I've heard EcmaScript 4 has all of the features of Ruby but in a more Java friendly syntax. Then I would pick PHP since it is a) more popular b) people actually use it. Then if I still had some money, I would donate it charity and leave Ruby out in the cold like the match stick girl. RoR is overly hyped.
  27. Re: C style syntax[ Go to top ]

    Isn't it interesting how you assumed I was talking about Ruby? I was actually not talking about any particular language at all but about the C style syntax argument popping up a few times to often recently for my taste. Please do not let the future of language development be governed by the lowest common denominator - the 9 to 5er not willing to learn new paradigms / languages. If a different syntax is better / more concise or easier to comprehend than that is good! DSL will come - anything that allows me to create these is good. My feelings about Ruby are no different to yours - and it was nice to see Zed calming the hype down a bit. This is probably unfair as the language is not the hype and as the RoR hysteria is neither but I've got enough other choices to let Ruby pass by. I do like Scala a lot however.
  28. Job opportunities, actually[ Go to top ]

    For the vast majority, it is.
  29. I think Java syntax is beautiful, so I would not adopt any other language to substitute the java language. I dislike very much languages like Python: they are script languages like Perl or JavaScript. Of course, very useful! But not for large Web projects. My technology choice (for large web developing) is: - Java on the server side; - on the client Flex or good swing-like MVC (Echo2, WingS, JSeamless) for java. On the client side swing applets (implemented with web start) are not an impressive and winning choice. Php with Joomla is another good web technology, very simple and very fast. The only great improvement I expect from Sun is on the side of the Virtual Machine implementation, and not on the language side. The current JVM's slowness is not acceptable: if the JVM will not be improved, I think java's dead is near. Nowadays new cross platform VMs are shipped, and so the java added-value is now not unique anymore. Sun should not loose time to improve Glassfish - Netbeans .... should invest time in a good & deep revision of the JVM.
  30. What would make you change languages?
    $$$ demand $$$
  31. The things I like best about Scala: * it's support for functional programming constructs because that makes lots of my code a lot more elegant (waaaay less interfaces and anonymous classes) and would make some of the framework code I work on more flexible (or at least, easier to extend) * Traits and Mixins because I think - a bit against the fashion of the last few years - that abstract classes are very useful, but often wish that I had a little bit more flexibility under my finger tips. * Implicit because that makes integrating/ upgrading Java code a lot easier. I'm not sure about case classes and pattern matching. The ideas sounds nice, but I just can't think of many cases where it would actually improve my code much. Maybe that would come if I'd ever use it for a real project :-) What I don't like about Scala and most other languages is the lack of good IDE support. Eclipse (but other Java IDEs would as well) saves me lots of time I would otherwise spend on searching, manually refactoring, etc. It's a show stopper for me; with good IDE support I would switch tomorrow.