The aurora language seems very interesting. Too bad there is already another language called Aurora...<p>I makes me think of Elm [1] and (functional) reactive programming. Reactive programming is fantastic. It's kind of like how a spreadsheet program works. If a variable changes, all variables who depend on it change as well. Given "a = b + c", if c increments by 1, so does a.<p>It has many advantages over event based systems, like Javascript. Reactive programs don't need callbacks. The changing values propagate the "event" through the system.<p>I'd love to hear what you guys think about this direction of programming. It seems very natural to me.<p>Edit: I also see reactive programming as the golden way of having changing state in functional languages. Functional languages have no problem with data or state. They have a problem with change of state. The reactive paradigm solves that problem. All change is implicit and code can be exactly as functional as before.<p>[1] <a href="http://elm-lang.org/" rel="nofollow">http://elm-lang.org/</a><p>[2] <a href="http://en.wikipedia.org/wiki/Reactive_programming" rel="nofollow">http://en.wikipedia.org/wiki/Reactive_programming</a>
This is a substantial piece of writing with information many here would find interesting; putting it behind a buzzfeed list style headline does it a disservice. One step short of calling it "Six weird programming paradigms that will blow your mind".
In the "concurrent by default" section I would add the hardware description languages like VHDL and Verilog.<p>Learning Verilog was an eye opening experience for me. It reminded me of the time I switched from unstructured BASIC to C when I was a kid. At first it seems complex and weird then suddenly it clicks and it all starts making sense.
A thought on dependent types:<p>Can a dependent type system catch <i>all</i> type errors at compile time? For example, suppose I write the following (in pseudo-code):<p><pre><code> // Variable x is an integer greater than or equal to 0 and less than 256.
int x (>=0, <256)
x = 128 // This is valid.
x = x * 3 // This violates the type.
</code></pre>
I can imagine how a compiler could catch that kind of error. But that's trivial. What happens in programs like this:<p><pre><code> int x (>= 0, <=10)
x = parseInt(getKeyboardInput)
</code></pre>
Now the compiler can't know for sure whether the type has been violated, because the value of getKeyboardInput could be anything. To take a page from Haskell, you could do something like this (which is still pseudocode, not valid Haskell):<p><pre><code> // x is a value that is either 1) an int from 0 to 10, or 2) nothing at all.
maybe (int (>= 0, <=10) x
// applyConstraint recognizes that parseInt may return a value violating x's contraints.
// Thus it transforms the return type of parseInt from int to maybe (int (>= 0, <=10)
x = applyConstraint(parseInt(getKeyboardInput))
</code></pre>
Or perhaps applyConstraint wouldn't have to be called explicitly, but would be implicitly added by the compiler as needed. I'm not sure which is better stylistically.<p>Either way, applyConstraint would be required any time a computation could return an invalid value. That would get tricky, because the compiler would have to track the constraints on every variable, even where those constraints aren't declared. For example:<p><pre><code> int w (>= 0, <= 10)
int x (>= 0, <= 2)
int y
int z (>= 0, <= 20)
y = w * x
z = y
</code></pre>
Here, the compiler would have to infer from the assignment "y = w * x" that y is always between 0 and 20.<p>Do any languages currently take the idea this far (or farther)?
I think an underrated non-standard approach to programming is graphical programming. Though this approach doesn't seem to received significant uptake amongst professional programmers, there is an application called max [0] that is popular amongst musicians and artists and quite surprisingly powerful and effective.<p>There's an interesting article [1] on how Jonny Greenwood of Radiohead uses it extensively, in there you can see some examples of how it works - modules wired together visually.<p>I think there is a lot of potential for a really nice mix between text-based programming and graphical programming to work for general programming too.<p>[0]:<a href="http://cycling74.com/products/max/" rel="nofollow">http://cycling74.com/products/max/</a>
[1]:<a href="http://thekingofgear.com/post/25443456600/max-msp" rel="nofollow">http://thekingofgear.com/post/25443456600/max-msp</a>
Some notes:<p>- parallel and concurrent are 2 different things<p>- the 'symbolic languages' definition seems off. Wikipedia puts it right:<p>> symbolic programming is computer programming in which the program can manipulate formulas and program components as data<p>So it's not "using graphs & such to program"
My first and only encounter with "Concatenative Languages" was programming the HP48GX[1] graphing calculator in highschool. Thinking back to it, I'm amazed by what you could do with it. It was very powerful even by today's standards. Whereas other kids had Gameboys, I had an "HP". I even got in trouble playing tetris on it during my German language class. My calculus teacher never knew that you could do symbolic integrals and derivatives with it (using a free computer algebra library). Sadly, the only program of note that I wrote for it was an implementation of the The Game of Life[2].<p>[1] <a href="http://en.wikipedia.org/wiki/HP-48_series" rel="nofollow">http://en.wikipedia.org/wiki/HP-48_series</a>
[2] <a href="http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" rel="nofollow">http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life</a>
I was a little disappointed that Factor[1] didn't get a mention in the 'Concatenative' section. Its stack effect checker takes care of a lot of the problems he mentions, IMO.<p>1: factorcode.org
QML [1] is an interesting example of declarative programming. It allows constraints and relationships to be defined and the runtime will do the rest. Perhaps it's not as powerful as other languages but in its domain it does very well.<p>[1] <a href="https://en.wikipedia.org/wiki/Qt_Modeling_Language" rel="nofollow">https://en.wikipedia.org/wiki/Qt_Modeling_Language</a>
LabVIEW is concurrent by default; control flow is done by linking the outputs of one function to the inputs of another. This makes writing concurrent loops ridiculously easy: just put two loops next to each other.<p>I rarely use it because organization is such a pain, but its "data-flow" paradigm does simplify a lot of logic.
I'm a huge fan of the declarative programming paradigm, but outside of Regexp and SQL and a handful of other DSLs, it's dead. Its death should be a case study in Open Source strategy: It died because it became boring before it became useful. SQL and Regexp have stuck around because they did something useful immediately.<p>I think that any future that the Declarative paradigm has within general purpose languages is the kind applied by compilers. For example, x = (a + b) - a can be reduced to x = a or even eliminated altogether with subsequent in-scope references to x being replaced with a. Another example is dead code elimination. These forms of declarative let you use an imperative or functional language immediately but gently introduce you to declarative benefits without having to deal with all the mind bending that is necessary to optimize pure declarative code.
Other languages to add to this list would be Dijkstra's Guarded Command Language, and Promela. Promela is especially interesting because of the (nondeterministic) execution semantics, which provide an extremely interesting way to model parallelism. In a similar vein, TLA+ is worth a look.<p>Both Promela (Spin) and TLA+ have active communities and have found fairly wide use in industry. They are generally used for model checking, model extraction by guided abstraction, and development by refinement, but can be used in a much more adhoc way to just experiment with parallel ideas.
Where is Aspect Oriented Programming and all the other offspring of the Inversion of Control pattern (Dependency Injection, Dependency Inversion, ...)?<p>Is this line of evolution in languages considered dead?
Pointed out elsewhere, but ANI appears to be dead according to its own tutorial[1]. However Funnel[2] by Martin Odersky/EPFL does a similar job, with a more explicit nod to Petri nets which are usually used as the basis for concurrent systems.<p>[1] <a href="https://code.google.com/p/anic/wiki/Tutorial" rel="nofollow">https://code.google.com/p/anic/wiki/Tutorial</a>
[2] <a href="http://lampwww.epfl.ch/funnel/" rel="nofollow">http://lampwww.epfl.ch/funnel/</a>
Code Search is a better way to do Declarative Programming for non-optimized solutions. I've been obsessing over this topic for the last few months. Right now there's limited versions in a few places: Python's howdoi and Visual Studio's Code Search.<p>A true Code Search would work like this:
1. Type in your search term in your code in a comment line. i.e. "Bubble sort StampArray by name"
2. Google/Bing/StackOverflow searches for your string. Replaces your terms with generics. Searches for "Bubble sort [an array of objects] by [string variable]"
3. Takes code results and shows them to you. Replaces all instances of [string variable] with getName() and all instances of [Object[]] with StampArray.
4. You pick your favorite.
5. Your IDE adds the code to a "code search module" which you can edit.
6. Your edits get added to the search database.<p>The best part? You could even put your Declarative Programming engine -inside- of the Search just by populating initial search results.
What about better code coming to exist in the future, you say? Well, you don't necessarily have to keep the same result forever. If it's been deprecated, you can re-do the search.
I've been thinking a lot about agent-oriented programming. I had a General Magic device back in the day and later thought the concept of a Telescript like language as applied more for code organization than code mobility might be interesting. I guess APIs won, but I still think there is something there.
Dependent types are a wonderful idea so long as I can do a couple things with them:
1. Copy paste them without complications. i.e. "non-null" requires no code that relies on specific variables unless there's a logical conflict (which variable?)
2. If it's a known failure, give me a warning. If it's an unknown failure, let me choose how to deal with it, again in a neutral fashion that I could simply say @Notnull<skip> and it would just skip the code if the variable is null.
Declarative programming is a great one, almost a magical experience.<p>"It feels like I am sitting at the controls of a quantum computer. I've got all my qubits (terms) all wired together in some complicated expression and when power is applied every qubit will instantly collapse out of superposition and crystallize into a perfect answer."<p>(From something I've been working on, <a href="http://kmkeen.com/sat/" rel="nofollow">http://kmkeen.com/sat/</a> )
The concurrent by default paradigm looks like it could be really useful for some cases. Does anyone know of any more well-used languages that support it?
Would be good to add Mozart/Oz.<p>Dealing with process coordination using the resolution of logical variables gave me a refreshing new perspective. The finite domain constraint system design in Oz is an awesome example of this in action.<p>An interesting tidbit - the Mozart/Oz team invented "pickling" before it caught on with Python.
I'm in the midst of something else and can't pull out my C++11 book now, but doesn't C++ have custom types that would let you declare something like "this must be a positive integer"?<p>I might be confusing this with custom literals.
Would be pretty cool to have concurrency by default and then a lock declaration I could do on a particular function to fix any concurrency issues. Would need a new style of debugger/code view though specifically for this purpose.
Isn't "Dependent types" just re-inventing how Fortran handles non allocatable array and character variables i.e. those who's length is declared at compile time using a parameter?
.... did .... did you crosspost this from reddit ???<p><a href="http://www.reddit.com/r/programming/comments/22nhb2/six_programming_paradigms_that_will_change_how/" rel="nofollow">http://www.reddit.com/r/programming/comments/22nhb2/six_prog...</a>