Most interesting non-mainstream language?

Viewed 7320

I'm interested in compilers, interpreters and languages.

What is the most interesting, but forgotten or unknown, language you know about? And more importantly, why?

I'm interested both in compiled, interpreted and VM languages, but not esoteric languages like Whitespace or BF.
Open source would be a plus, of course, since I plan to study and hopefully learn from it.

43 Answers

I love compilers and VMs, and I love Lua.

Lua is not as well supported as many other scripting languages, but from a mindset like yours I'm sure you will fall in love with Lua too. I mean it's like lisp, (can do anything lisp can as far as I know), has lots of the main features from ADA, plus it's got meta programming built right in, with functional programming and object oriented programming loose enough to make any type of domain language you might want. Besides the VM's code is simple C which means you can easily dig right into it to appreciate even at that level.

(And it's open-source MIT license)

I am a fan of the D programming language. Here is a wikipedia article and and intro from the official site.

Some snippets from the wikipedia article:

The D programming language, also known simply as D, is an object-oriented, imperative, multiparadigm system programming language by Walter Bright of Digital Mars. It originated as a re-engineering of C++, but even though it is predominantly influenced by that language, it is not a variant of C++. D has redesigned some C++ features and has been influenced by concepts used in other programming languages, such as Java, C# and Eiffel. A stable version, 1.0, was released on January 2, 2007. An experimental version, 2.0, was released on June 17, 2007.

on features:

D is being designed with lessons learned from practical C++ usage rather than from a theoretical perspective. Even though it uses many C/C++ concepts it also discards some, and as such is not strictly backward compatible with C/C++ source code. It adds to the functionality of C++ by also implementing design by contract, unit testing, true modules, garbage collection, first class arrays, associative arrays, dynamic arrays, array slicing, nested functions, inner classes, closures[2], anonymous functions, compile time function execution, lazy evaluation and has a reengineered template syntax. D retains C++'s ability to do low-level coding, and adds to it with support for an integrated inline assembler. C++ multiple inheritance is replaced by Java style single inheritance with interfaces and mixins. D's declaration, statement and expression syntax closely matches that of C++.

I guess a lot depends on what you mean by 'non-mainstream'.

Would lisp count as non-mainstream?

I would suggest having a look at Erlang - it's been getting a bit of press recently, so some of the learning resources are excellent. If you've used OO and/or procedural languages, Erlang will definitely bend your mind in new and exciting ways.

Erlang is a pure functional language, with ground-up support for concurrent, distributed and fault-tolerant programs. It has a number of interesting features, including the fact that variables aren't really variables at all - they cannot be changed once declared, and are in fact better understood as a form of pattern.

There is some talk around the blogosphere about building on top of the Erlang platform (OTP) and machine support for other languages like Ruby - Erlang would then become a kind of virtual machine for running concurrent apps, which would be a pretty exciting possibility.

I've recently fallen in love with Ocaml and functional languages in general.

Ocaml, for instance, offers the best of all possible worlds. You get code that compiles to executable native machine language as fast as C, or universally portable byte code. You get an interpreter to bring REPL-speed to development. You get all the power of functional programming to produce perfectly orthogonal structures, deep recursion, and true polymorphism. Atop all of this is support for Object-Orientation, which in the context of a functional language that already provides everything OOP promises (encapsulation, modularization, orthogonal functions, and polymorphic recyclability), means OOP that is forced to actually prove itself.

Smalltalk (see discussion linked here). Sort of the grand-daddy of the dynamic languages (with the possible exception of Lisp and SNOBOL). Very nice to work with and sadly trampled by Java and now the newer languages like Python and Ruby.

FORTH was a language designed for low level code on early CPU's. Its most notable feature was RPN stack based math operations. The same type of math used on early HP calculators. For example 1+2+3+4= would be written as 1, 2, 3, 4, + , +, +

Haskell and REBOL are both fascinating languages, for very different reasons.

Haskell can really open your eyes as a developer, with concepts like monads, partial application, pattern matching, algebraic types, etc. It's a smorgasbord for the curious programmer.

REBOL is no slouch either. It's deceptively simple at first, but when you begin to delve into concepts like contexts, PARSE dialects, and Bindology, you realize there's much more than meets the eye. The nice thing about REBOL is that it's much easier to get started with it than with Haskell.

I can't decide which I like better.

Boo targets the .NET framework and is open source. Inspired by Python.

PROLOG is a rule-based language with back-track functionality. You can produce very human-readable (as in prosa) code.

I find constraint languages interesting, but it is hard to know what constitutes forgotten or unknown. Here are some languages I know about (this is certainly not an exhaustive list of any kind):

  • Ciao, YAP, SWI-Prolog, and GNU Prolog are all Prolog implementations. I think they are all open source. Ciao, gnu prolog, and probably the others also, as is common in Prolog implementations, support other constraint types. Integer programming for example.
  • Mozart and Mercury are both, as I understand it, alternative logic programming languages.
  • Alice is more in the ML family, but supports constraint programming using the GECODE C++ library.

Drifting a little bit off topic....

  • Maude is an interesting term rewrite language.
  • HOL and COQ are both mechanized proof systems which are commonly used in the languages community.

Lambda-the-Ultimate is a good place to talk about and learn more about programming languages.

I would have to say Scheme, especially in it's R6RS incarnation.

Modula-2 is the non-mainstream language that I've found most interesting. Looks mainstream, but doesn't quite work like what we're used to. Inherits a lot from Pascal, and yet is different enough to provide interesting learning possibilities.

Have a look at Io at http://www.iolanguage.com/ or Lisaac at: https://gna.org/projects/isaac/ or Self at: http://self.sourceforge.net/ or Sather (now absolutly forgotten) or Eiffel http://www.eiffel.com

Why here are a few reasons. Io is absolutly minimalistic and does not even have "control flow elements" as syntacit entities. Lisaad is a follow-up to Eiffel with many simplifications AFAIKT. Self is a followup to Smalltalk and Io has taken quite alot from Self also. The base thing is that the distinction between Class and Object has been given up. Sather is a anwer to Eiffel with a few other rules and better support for functional programming (right from the start).

And Eiffel is definitly a hallmark for statically typed OO-languages. Eiffel was the first langauge whith support for Design by contract, generics (aka templates) and one of the best ways to handle inheritance. It was and is one of the simpler languages still. I for my part found the best libraries for Eiffel.....

It's creator just has one problem, he did not accept other contributions to the OO field.....

Regards

I recently learned of the existence of Icon from this question. I have since used it in answers to several questions. (1, 2, 3, 4)

It's interesting because of its evaluation strategy - it is the only imperative language I know that supports backtracking. It allows some nice succinct code for many things :)

Learning any language that requires you to rethink your programming habits is a must. A sure sign is the pace at which you skim through the documentation of a language's core (not library). Fast meaning fruitless here.

My short list would be, in my order of exposure and what were the concepts I learned from them:

  • Assembly, C: great for learning pointers and their arithmetic.
  • C++: same as C with an introduction to generics, as long as you can stand the incredibly verbose syntax.
  • Ruby/Lua: scripting languages, dynamically typed, writing bindings for existing C libraries.
  • Python/C#/Java: skipped, these languages look to me as a rehash of notions originating elsewhere with a huge standard library. Sure the whole packages are nice, but you won't learn new concepts here.
  • OCaml: type infererence done right, partial application, compiler infered genericity, immutability as a default, how to handle nulls elegantly.
  • Haskell: laziness by default, monads.

My €.02.

I can't believe Logo is so forgotten. Ok, it's Logo. Sort of like lisp, but with slightly uglier syntax. Although working with lists in Logo, one encounters the delightfully named 'butfirst' and 'butlast' operations. =P

First answer - Scheme. It's not too widely used, but definitely seems like a solid language to use, especially considering the robustness of DrScheme (which in fact compiles Scheme programs to native binary code).

After that - Haskell is incredibly interesting. It's a language which does lazy evaluation right, and the consequences are incredible (including such things as a one-line definition of the fibonnaci sequence).

Going more mainstream, Python is still not really widely accepted in the business circles, but it definitely should be, by now...

Scheme immediately comes to mind, a nicer Lisp.

Also, I know that your question disqualifies esoteric languages, but consider INTERCAL. It has the facetious COME FROM operator (like GOTO, but placed at the jump destination, not the jump point). This operator seems strange, but can we say that its influence is seen in Aspect Oriented Programming? In AOP, advice is often specified at some external location, simply looking at the advised code does not always make control flow clear. Looking at the advice however informs the reader where control comes from.

Looks like at least one other person agrees with me that COME FROM is like AOP

Mathematica because it is a uniquely successful term-rewrite language (a completely different method of evaluating code!).

The first major (non-BASIC) language that I learned was Dream Maker, from http://www.byond.com. It's somewhat similar to C++ or Java, but it's largely pre-built for designing multiplayer online games. It's very much based on inheritance. It's an intersting language especially as a starting language, it gets gratifying results quicker, and lets be honest, most people who are first learning to program are interested in one thing... games.

I find Factor, Oz and OCaml quite interesting. In fact, I have started using Factor for personal projects.

I've recently looked up a lot about Windows PowerShell.

While not necessarily just a language. It's an awesome shell that has a built-in scripting language. It's basically a super-beefed up command line shell.

Unlike Unix shells, where everything is string text (which definitely has it's benefits), PowerShell commands (cmdlets) use objects. It's based on the .Net framework so you guys who are familiar with that will have probably already figured out that anything PowerShell returns can be piped and the properties and methods of that object can be used. It's fun to say "everything is an object!" again just like when OOP was getting big.

Very neat stuff. For the first time, Windows is implementing some of the Unix command-line interface tools similar to grep and the whole bunch.

If you're interested in VMs, you should look at Parrot...There's a bunch of languages supported and that's pretty neat....

O'caml is a good language if you want to learn how to implement a compiler...

I heartily recommend Tcl. I think it fits your mindset of playing with languages nicely.

To be honest, it's not that unknown. Most programmers would encounter it sooner or later due to the popularity of Tk. But it is shunned and avoided by most programmers like a plague so most programmers don't fully know the language. Unfairly so in my opinion - they just don't understand the beauty and power that can be extracted out of it's simple semantics.

Tcl is a very playful language. Take OO in tcl for example. Designing OO systems in tcl for tcl is almost a hobby. Every year someone will think up a new one. Of course for production code most will use established libraries -- that's right, in tcl OO is just a library!

Another game the tcl community keeps playing is trying to make the tcl interpreter understand other language's syntax and/or semantics. As illustrated by the following:

There are many more games you can play with like deleting all conditional constructs from the interpreter and see if you can build a usable programming language from it. That led to discussions about pure functional programming which led to combinator logic, currying and church numerals.

Seriously fun stuff.

Lava is a very interesting experimental language. It tries to incorporate some new concepts very useful for RAD. No practical use for it currently, but interesting none the less on the long term.

More practical but equally interesting is the L.in.o.l.e.u.m. (choose section, link too long to paste) language. It is a low level language like assembly, but much easier to learn, also claims to be cross/platform (not tested personally). Some very nice programs are developed in this language tough (look on website).

And of course some more common languages are useful to learn too and provide some interesting points:

  • ADA: nice concept, easy to learn to code well, also used in military projects, by NASA and by Boing.
  • Ruby: super easy to learn oo script language, a must for GUI testing and web development.
  • ERLANG: Mainly used by Ericsson for concurrent programming, also a functional language.
  • Logo: THE language for teaching primary school children (aka. Lisp for beginners).

Finally I recommend Context Free which is a language to create complex pieces of computer generated art.

I'll second the motion for Digital Mars D language. It has many of the productivity features of C# or Python, but the low level power of C. It's a nice language to learn some C concepts and also offers inline-assembler (for learning that) and support for many programming paradigms through contracts, delegates, and some reflection. It also has really nice array handling and full Unicode support.

Also if OCamL looks interesting to you, maybe check out F#, which is inspired by OCamL. It's a new .NET language that has only been release in "community previews" so far, but it looks pretty cool.

Have you heard of the O.H.R.RPG.C.E. game engine?

How about the compiled (!) language used to "script" games in?

Just for starters, spaces are stripped by the compiler. Not consecutive spaces, all spaces. Writing "walk hero north" is the same as "walkheronorth" and "wa lkhe ron rt h".

I haven't used it in a long time, and many of the things I've complained about before (such as defining parameters at the very top of your source code for every function, then putting the functions themselves) have been fixed.

Also, I just wanted to mention it again, yes, you have to compile scripts before you can import them into your game, despite the fact that there's no reason for the game editor itself to not contain a compiler.

For me that would be the Joy programming language which is an elegant functional stack-based language. If you are interested in the implementation of this kind of languages, you can look at the Cat programming language which is similar, but has a static type system. There are implementations available in C#, and other languages.

Note: I should disclose that I am actually the author of Cat.

Nemerle http://nemerle.org/Main_Page.

Its powerfull statically-typed programming language for the .NET platform. It support functional programming paradigm as well as object-oriented paradigm. Nemerle macroses make this language very powerfull and extensible. For more information about macroses see http://nemerle.org/Macros


Eiffel http://eiffel.com

It one of the most powerfull and truly object-oriented language ever designed. We can use this language to compile in C code or for .Net platform. It is very first language with Design by Contract, and Void Safety that can significally reduce bugs in you app.

For more information about Void Safety and C.A.R. Hoare's "billion-dollar mistake" :

B.Meyer "Void Safety: Putting an End To the Plague of Null Dereferencing", Dr. Dobb's Journal 01, 2009, http://www.ddj.com/architect/219500827 or http://se.ethz.ch/~meyer/publications/hoare/void-safety.pdf

Poplog is awesome. IIRC it's a mash of Prolog, lisp, and a few other languages. Just think if all the 70's programming languages had a orgy and accidently a baby.

It was first introduced to me in an Artificial Intelligence course, and with it, you can make a chat-bot in under 100 lines, not including dictionaries.

It's awesome.

More info can be found on wikipedia.

The following set should keep you busy:

FORTRAN - Simplistic language that was popular for far too many years in engineering circles
LISP - The classic AI language. Prolog was better in my view, but LISP was more popular
Ada - Gave the world packages and generics and strict data typing.
ALGOL - Created to fix many of the problems with FORTRAN. It is the grandfather of C,

All were hugely influential languages in their day.

Related