views:

271

answers:

6

What are the programming languages that compile to native code and which have provided a comprehensive library with them?

Libraries that includes functionality such as Networking, File IO, RegEx, Database, Graphics, Multimedia, Win32 API bindings, File compression, etc.

+1  A: 

I am currently working with Qt.

http://doc.trolltech.com/4.5/index.html

Edit: a Nitpick..

A programming 'language' is a grammar and set of semantics and syntax. It contains NONE of the things you are asking about. What you want to know about is API's, not languages.

San Jacinto
Qt isn't a programming language (yet).
Ron Warholic
yes, you commented as i was editing.
San Jacinto
+4  A: 
  • I'll assume everyone has thought of C and C++.
  • Haskell is the obvious one here. In particular, if you want batteries included, you want the Haskell Platform.
  • OCaml fits this category, as well.
  • Go is a new player that has (most of) the feature you asked.
  • The D programming language with it's standard library Phobos.
  • Some Lisp dialects include a native compiler.
Emil Ivanov
See also: OCaml Batteries Included project: http://batteries.forge.ocamlcore.org/
Juliet
Speaking as a Common Lisp fan, while most serious implementations do compile to native code, the libraries were somewhat lacking last I saw.
David Thornley
A: 

Hmmm. The funny thing is, most OSes have native APIs for all that stuff. So all you really need is a language that can link in OS calls. Pretty much any compiled language worth its salt will do that.

T.E.D.
But native OS calls are usually a **huge** PITA to use and are platform specific. For about 99% of cases you want to abstract these away.
dsimcha
For most UI work, I've found I'm much happier using the native OS GUI support. Portable frameworks never look quite right, and they always manage to abstract away something I want.
T.E.D.
+1  A: 

You can compile Java to native code using GCJ.

Any language targeting the .NET CLR (VB.NET, C#, F#...) can be pre-compiled to native code using NGen.exe - more here.

Corbin March
A: 

Is Objective-C with Cocoa/CocoaTouch an acceptable answer?

You can use this pair for programming applications running on devices with restrictive constraints on batteries (laptops and mobile phones).

mouviciel
+4  A: 

Delphi meets all those requirements. This is a development environment based on the Object Pascal language.

DSO