16

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
  • 2
    I assume we are talking about particular compilers/vendor implementations? Because I don't think any language satisfies what you are talking about.
    – Cade Roux
    Nov 25, 2009 at 14:47

6 Answers 6

14
  • 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, like Common Lisp with its SBCL, CCL or ECL (to C) compilers.
  • Rust is a system programming language but doesn't include batteries but has crates ― to avoid stale standard library modules
3
  • 1
    See also: OCaml Batteries Included project: batteries.forge.ocamlcore.org
    – Juliet
    Nov 25, 2009 at 14:52
  • Speaking as a Common Lisp fan, while most serious implementations do compile to native code, the libraries were somewhat lacking last I saw. Nov 25, 2009 at 16:12
  • C++ fits the batteries included bill marginally, while C doesn't. It's neither good, nor bad, just an observation. Of course, they don't provide a heavy standard library like the OP asks, but you get to use the platform's API, but then one might not always get a portable solution.
    – legends2k
    Aug 19, 2019 at 2:54
8

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

2

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).

2

Swift by Apple, but now Open Source, compiles to native code and is available for OS X and Linux.

Batteries are completely included for Mac OS X and iOS through Apple's extensive libraries/APIs, and support for OS independence is on the way with the development of core libraries.

1

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.

2
  • 4
    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
    Nov 25, 2009 at 16:47
  • 3
    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.
    Nov 25, 2009 at 18:48
0

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.

1
  • 4
    Qt isn't a programming language (yet). Nov 25, 2009 at 14:43

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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