Tell me more ×
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.

Some languages in the past have been influential without ever reaching wide adoption. For example, many languages owe much to the design of Algol 68, even though few compilers were ever written for it. The Dylan language was killed by Apple but had a clean and interesting design.

What other programming languages had cool ideas but-- for whatever reasons-- didn't make it to the mainstream? Is there an interesting language feature that you wish your main language had? Is there a feature ahead of its time that we'll soon see used?

share|improve this question
show 1 more comment

closed as not constructive by Mark Trapp Jan 23 '12 at 11:51

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

19 Answers

up vote 12 down vote accepted

Common Lisp, or something equivalent.

The killer feature is the macro system, which essentially allows arbitrarily extending the language (I've seen different object-oriented systems added to Lisp with macros). Other useful things are the multi-paradigm nature, the extensive built-in arithmetic (including arbitrary-sized integers, rational numbers, and a general treatment of complex numbers), strong run-time types with optional compile-time types, and an easy-to-use OO system with multimethods.

share|improve this answer
show 2 more comments

String Aggregator for SQL

i.e., a simple standard process, like avg() or nvl(), that takes a column of values and appends them to each other, given a string separator.

E.g. Given

select name_col 
from my_table;

returns:

Ringo
John
Paul
George

, then

select substring(stragg(', '||name_col), 3) 
from my_table;

should return:

Ringo, John, Paul, George
share|improve this answer
1  
That wouldn't work for Oracle.. And trying it in Sybase (which uses TSQL I believe) it only returns 1 record, not a string of concatenates. Also, coalesce is usually just a nvl or isnull function, is it not? – glasnt Dec 2 '10 at 2:34
show 1 more comment

D still has a chance to make it into the mainstream, though it's not there yet. Two key features that go together and for some purposes can be treated as one feature are:

  1. String mixins. This is basically like a compile-time eval. Compile time strings can be compiled as normal code in whatever scope they're mixed into.

  2. Compile time function evaluation. This allows said code to be generated at compile time, so that it can be mixed into any scope necessary.

Combine these with regular template metaprogramming and the result is some pretty powerful and transparent (to the API user) code generation.

share|improve this answer
1  
Could you link to which D you are talking about? There've been several languages with that name. – Macneil Nov 24 '10 at 14:56
3  
digitalmars.com/d/index.html – dsimcha Nov 24 '10 at 17:35
show 3 more comments

Object-Orientation

Seriously. The mainstream languages have absolutely abysmal implementations of OO. Sometimes one wonders whether the designers of those languages have ever actually heard of Simula or Smalltalk.

share|improve this answer
5  
I would consider Objective-C and Ruby mainstream. And they both have very reasonable OO models, that can measure up to Smalltalk's. – back2dos Nov 27 '10 at 18:01
3  
To answer for one of them: Bjarne Stroustrup did some work in Simula 67, and then had to translate it into C. He invented "C with Classes" explicitly to put what he really wanted from Simula into C (so he could have OO and performance together), and C++ developed from that. – David Thornley Dec 2 '10 at 14:54
show 1 more comment

Well, Felix hasn't made it into the mainstream and has cool features. There are certainly interesting features I wish my main language had, the most important one is well principled polyadic programming. {oh, my main language is Felix, because I'm the designer and compiler implementor .. :} Joerg will love the OO implementation, since it is perfect (there isn't any OO in Felix :)

I'm not sure what string mixins are, nor exactly what would be expected by compile time function evaluation: Felix has a user programmable grammar, the action code for the grammar productions are written in Scheme (does that count? for one or both of those features?)

share|improve this answer

I think multi-method dispatch is very cool. At first it might sound like simple overloading, but the decision is deferred to runtime. Multi-method dispatch is part of CLOS and Dylan.

And the generalization of it, predicate dispatch, is even better. The JPred language showed that it can be added to a Java-like language. My guess is it might take a decade or two before predicate dispatch reaches the mainstream.

share|improve this answer
3  
@Larry: It's Paul Graham's "blub" principle (if I've spelled that right). If you don't have a certain feature, you know how to program without it, and you don't appreciate its advantages, but you can see to some extent how it might mess things up. – David Thornley Dec 2 '10 at 14:51
4  
@Michael. I agree, and this sort of thing makes me wonder if we've gone too far in the direction of making programming safe for the unskilled. – Larry Coleman Dec 2 '10 at 14:58
1  
@Larry: ...rather than making the unskilled skilled and weeding out the ones who can't. – Michael K Dec 2 '10 at 15:05
show 7 more comments

Does "the debugger" count as a language feature?

I don't care how fancy concepts a language expresses or what cool features it has, if debugging it amounts to essentially leaving print statements all over the place, it's garbage.

share|improve this answer
show 1 more comment
  • proper closures
  • continuations
  • the ability to make variables lexical or dynamic (in terms of scoping)
  • prototype based oo
  • real macros

With the exception of prototype based oo I doubt any of these will make their way into languages they aren't already in because:

  • it makes the language implementation much more complex, slower and the perceived trade-off isn't worth it
  • the implementor/designer doesn't like it
  • the implementor/designer feels it's not worth the extra work
share|improve this answer

Build in immutability support for all fist class members , especially more robust than C++ const correctness

share|improve this answer

Lambda expressions. They are incredibly useful, but have not gained a lot of momentum yet. Java has (limited) suport for them in the form of anonymous classes. not really true lambda, but close and still useful. C uses function pointers, which are awkward. The ability to pass a piece of code around to use where needed is a boon to programming, as Lisp and other functional languages demonstrate.

share|improve this answer
1  
+1 In my opinion the single most useful language feature that few non-functional languages possess. I would bolt on to that currying however. – Orbling Dec 2 '10 at 19:56
show 4 more comments

Design-by-contract, done right. MS almost got it right when they did Spec#, but they threw it all away with the poor implementation in VS2010 / .NET 4.

Also, parallelism, though some of the stuff they've done there in .NET 4 is interesting.

Edit: Also, Aspect Oriented Programming I'm fed up of having to splatter logging calls everywhere. It'd be nice to be able to have this done for me - say, a logging call at the start of every set accessor.

share|improve this answer
show 4 more comments

Scala.

I have mentioned a lot of reasons under this thread.

share|improve this answer

I would like to throw my hat in the ring for REXX.

It's easy to learn, fun to write, is incredibly flexible (including Object Orientation), and ports to just about every environment you can think of -- with OS extensions available for many of them.

Its no less relevant than PERL, in my opinion. And, it stands head-and-shoulders with some of the big-boys of development, in terms of reliability and performance.

It's an interpreted language, so it may not be the best choice for a full application, but as a scripting language and for smaller apps, I've always enjoyed it.

I think REXX would be a terrific language for teaching the fundamentals of computer programming, as well.

share|improve this answer

Mixin Inheritance

It works in C++ and DataFlex...and almost nowhere else. Very useful in certain contexts.

share|improve this answer
show 1 more comment

Nested functions.

share|improve this answer

Non-nullable reference types

Why? Because the purpose of type systems is to "prove" the correctness of our programs by limiting the values a variable can take to some meaningful ones.

But they fail to do so, as there is a hidden extra value in our reference types without knowing - one, that is in most cases not meaningful: null

Non-nullable reference types by default would give us meaningful types again, thereby reduce run-time errors that now can be caught at compile-time, and force the programmer to be explicit if null is actually a desired, valid state too.

share|improve this answer
1  
For an array of nullable reference types, it could be null. For an array of non-nullable reference types, the programmer would have to specify initial values. – dubiousjim Oct 19 '12 at 14:44
show 1 more comment

Why is it that 2/3 of the responses here seem to be things that lisp had in 1962 but everything else is only adding now?

share|improve this answer
show 2 more comments

From APL: Better array and matrix manipulation tools, like those that were considered basic functions within APL. These functions simplify all kinds of coding problems found in the fields of vision, voice recognition, terrain traversal, etc.

There are a lot of other built-in functions from APL that I miss using in C, but the array processing functions are missed most.


From LabVIEW: Built-in or easily implemented libraries for a profusion of HW devices, SW APIs, and interface protocols. It's elementary to construct a system that, once working with one device, can be upgraded to work with dozens of similar devices by just installing additional VIs--no additional manipulation of the 'code' is required.

share|improve this answer

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