views:

309

answers:

7

One of the key properties to designing comprehensible software (and, indeed, designing anything at all) is to develop a good set of abstractions. These days, those abstractions include things like functions, classes, interfaces, recursion, and higher-order functions. But what else is there? How can we further abstract our designs, so that I needn't think about anything but my immediate, direct goal? What novel abstractions have yet to be leveraged by existing technologies?

Also note that most of the items on my list (with the exception, perhaps, of recursion) are also tools used for code reuse. Code reuse is not the subject of this question, and is not what I see as a necessary aspect of a good abstraction. Functions are useful as abstractions because they hide what they are doing behind a descriptive name, not because I can call them from several different places.

A poorly-formed idea: Is a driver function that only calls a sequence of other functions, without maintaining any state of its own, really the same as a function? We write it as a function, and call it as a function, but perhaps it represents a different concept? This is reflected in some languages by making a distinctions between procedures returning values and procedures not returning values. But maybe there's a better way to view that difference, some different way to abstract the sequence of relatively unrelated steps?

So to reiterate, how can future programming languages better facilitate abstraction?

+1  A: 

By having built in detection of stupid ideas that, when tripped, lock the developer out of the IDE and refuse to let them code ever again.

OOP facilitates abstraction quite nicely. It's developers that come up with poorly formed ideas.

Spencer Ruport
Okay, sarcastic but I'm leaning more and more towards a more restrictive compiler. Also I agree that if you actually understand OOP, it's good enough, but there are a LOT of people who don't understand it. A language that enforced good OO design would solve a lot of problems.
Bill K
Thats like saying there is no room for improvement in present programming languages. Thats BS, IMO.
Pranav
+5  A: 

A powerful absraction tool, Lisp macros. Why not look into the past and present? :)

Nick D
Fine then, in what ways can Lisp macros better facilitate abstraction? :) Using macros is basically equivalent to creating a new language though, so the question is still relevant, I think.
Nick Lewis
IMO if you can write mini languages (not complex) to describe specific types of problems then you have a powerful abstraction form. Of course abstraction is good, but on the other hand, it may be difficult to keep it under control :-D
Nick D
+3  A: 

They can use self-exposing semantics to better allow metaprogramming of the environment/language presented as the end-user interface. Mutable language semantics.

Aiden Bell
See Nick D's answer above :-)
Justicle
(yes (but can you) (alter (everything in) (the environment))?
Aiden Bell
Exposing *more* seems antithetical to the goal of enhancing abstraction.
Nick Lewis
Depends on how that exposure impacts the development process. If you could alter all of Java's syntax and semantics ... you could still program in Java ... or break the barrier. *choice*, not forced exposure or increased complexity.
Aiden Bell
A: 

Let's see, how about if we make abstraction mandatory for every data type, and then provide ways of generalizing our abstractions over type parameters? Wait! I've just reinvented CLU. Do I get a Turing Award?

Anyone interested in the role of abstraction in programming should study CLU.

Norman Ramsey
A: 

Eiffel code proofs. (warning: link to PDF!)

+1  A: 

Some areas that I think are potentially fruitful:

  • Intentional Programming, or something similar. Charles Simonyi's company Intentional Software has been keeping pretty quiet for a while but is now starting to show some promising early demonstrations.

  • Functional Programming: ideas from functional programming are increasingly finding their way into more mainstream languages like Python, C# (Linq, lambdas, etc.) and even C++ (lambdas in C++ 0x). F# is becoming a first class .NET language with full support in Visual Studio. The rise of multi core development is another factor driving the wider adoption of functional concepts.

  • Domain Specific Languages (DSLs): closely related to the ideas behind Intentional Programming, Microsoft seem to be putting some effort into supporting DSLs as part of the .NET ecosystem.

  • Much more sophisticated IDEs. There are already some positive developments with refactoring tools in IDEs like Visual Studio and IntelliJ but I think there's a lot of room for progress in this area. Moving away from dumb text source files towards something more like an abstract syntax tree representation could make it much easier to work at a higher level of abstraction. Again, this connects with many of the ideas behind Intentional Programming.

mattnewport
A: 

Functional programming, aspect oriented programming, design by contract and generally everything that takes us away from the dark age of imperative programming.

Also, I hope non - managed software development will cease to exist. C++ and other low level stuff makes me sad. :-(

I like my LINQ, my lambda operator, my extension methods and my fluent interfaces. Oh, and I love PostSharp.NET. And F#, but I guess it's very hard NOT to love F#. :-)

Turing Complete