Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've got a small project coming up where I can choose any language I want. My team prefers the feeling of safety we get from static typing. In our experience, dynamically typed languages can be more difficult to maintain (we feel they are too "magic"). The usual choice would be Java, but our team is expressing interest in the conciseness and flexibility provided by features of some of the other languages such as Python and Ruby.

Based on my team's interests, I need some help evaluating which language to use. Ideally, the language would support these features:

Bonus points for languages that:

  • Aren't dependent on Microsoft or any specific operating system.
  • Have a non-JVM implementation.
  • Have an ORM.
  • Have a web development framework.

Apart from these criteria, I'd still love to know more reasons why to choose the language(s) in your answer, and any experience you've had with them. Hopefully the answers here will be useful to anyone else that wants to evaluate some alternatives to Java without blindly switching another popular language such as C#.

*Edit: My question was closed due to how poorly I communicated my question before. I hope that I have cleared things up since I got the question re-opened. By the way, I've put my own research into a community wiki answer below, so don't think I haven't done any homework. ;-)

share|improve this question

closed as primarily opinion-based by MichaelT, gnat, GlenH7, Michael Kohne, Kilian Foth Aug 29 '13 at 10:28

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Actually, Scala does not have properties. That's the whole point! You cannot fix a violation of the Uniform Access Principle by adding yet another, different way of accessing things. You fix it by either removing ways to access things (e.g. in Self, Newspeak, Io, Ioke, Seph, messaging is the only way of accessing things, therefore the UAP trivially holds), or by unifying different ways to access things (e.g. in Scala, there are two different ways of accessing things, fields and methods, but they are indistinguishable). –  Jörg W Mittag May 31 '11 at 1:57
    
@jorg-w-mittag In that case, is there a term for a language that either (has properties || follows the Uniform Access Principle)? Because that's a mouthful. –  arussell84 May 31 '11 at 2:18
2  
Why aren't Haskell, OCaml and ML on your list? –  davidk01 May 31 '11 at 6:13
    
@davidk01 For all three of those languages, I could not find evidence of properties or the Uniform Access Principle. Do you have evidence otherwise? –  arussell84 May 31 '11 at 15:39
4  
There is a discussion on meta on the closing of this question. –  Yannis Rizos Jun 1 '11 at 18:52
show 1 more comment

3 Answers

Delphi is

  1. Statically (and strongly) typed,
  2. Uses properties, these can read and write directly from a "field", or use getters and setter methods (or a combination of the two). e.g. property Foo: string read FFoo write SetFoo;
  3. Has first class functions. (implemented as strongly typed function pointers) - these can be passed as variables, returned from functions and even assigned to typed constants
  4. has supported anonymous functions since Delphi 2009.

EDIT:

As per @Mason's comments:

Delphi is currently a Windows 32bit only product, but a 64 bit version will hopefully be released later this year, along with a OSX and Linux version. There is also an open-source clone called Free Pascal that runs on several different platforms, but it doesn't have all the language and standard library features that Delphi has. There was also an unsuccessful Linux version some years ago which relied on QT and and IIRC Wine.

Delphi generates pure native code, there are no runtime libraries required.

There are several OSS and commercial ORMs available

It can be (but rarely is) used for Web development.

share|improve this answer
    
WRT the bonus points: Delphi only runs on Windows at the moment, though a cross-platform version is scheduled to come out this year. (There's an open-source clone called Free Pascal that runs on several different platforms, but it doesn't have all the language and standard library features that Delphi has.) Delphi compiles to native code; no JVM (or CLR) required. There are several ORMs available, and making DB access easy has always been one of the language's historic strengths. And there's an official web development framework, plus various other ones by community members. –  Mason Wheeler Jun 2 '11 at 17:37
1  
One point about your edit. I'm not a Delphi team member or anything, so I can't say anything official about the product, but from what I've heard from various statements by Delphi team members, I don't think there will be "a 64 bit version, a OSX version and a Linux version" as if they were different products that need to be purchased separately. Rather, they're making the next release a cross-platform version; the Delphi compiler and appropriate parts of the standard libraries will be modified to be able to create outputs that run on other platforms in addition to Windows. (I think.) –  Mason Wheeler Jun 2 '11 at 21:03
add comment

I believe Boo actually fits your requirements as well. It is .Net so would probably fall on the less interesting to you pile but is full of interesting concepts.

It's a programming language that while is statically typed looks much like Python. It infers the type of the variable at creation time rather than requiring you to define it your self. Giving you the feel of a dynamic language with out all the nasty side effects.

It also is very useful for creating DSL since the compilation pipeline can be programmatically changed allowing for injection of behaviors at compile time.

share|improve this answer
    
You're right, but I'm glad you shared anyway! =) –  arussell84 May 31 '11 at 15:33
add comment
up vote 8 down vote accepted

The most interesting language that qualifies that I found in my research is Haskell.

Whether or not it is popular in the web development community, Haskell does have web frameworks. An overview of three of them was even featured in Hacker News.


Another very promising language looks to be Scala, which is:

Scala runs on the JVM, so it isn't tied to any operating system, but this is the only implementation with any real traction (there is a less mature .NET implementation and some interest in an LLVM implementation). Scala does have the Lift framework, which has garnered quite a bit of praise. While I don't have any real experience with Scala yet, it has been receiving quite a bit of attention lately. For example, this blog post was recently featured on Hacker News.


Objective-C looks interesting, as well, although its use seems pretty much limited to Mac OS X and iOS development currently. It does not seem to have any mature web development frameworks or ORMs, yet.

  • Optional static or dynamic weak typing,
  • Supports properties in version 2.0 of the language,
  • Has first-class functions,
  • Supports anonymous functions (called blocks) in newer versions of the language.

D appears to be a very well thought-out language, as well. There seems to be at least a couple of web frameworks (Rootin Tootin, Dweb) available, but I'm not sure of their quality or maturity.

  • Statically and strongly typed,
  • Supports properties,
  • Has first-class functions, including anonymous functions.

Other languages that qualify, but seem less interesting to me:

share|improve this answer
1  
since scala is really just java code you can use any existing web framework for java that you like. For example I've mixed scala and spring, using scalate for the view. It works just fine. –  Kevin Jun 9 '11 at 17:33
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.