News for hackers. Stuff that matters.
Re:Future of Programming Languages by overgard on Friday November 28, 2014 @01:16AM (#8669870)
It seems like most languages are converging on a pretty standard feature set -- to the point where what "the" language is might not really matter because all its competitors will probably be roughly similar. I think we're at the point where almost every language will have:

- Lexical scope & closures

- Reflection

- Functions-as-objects

- The standard map/filter/reduce functions (sometimes under different guises and names)

- Immutability mostly by default, with the ability to override it

- Some hybrid of dynamic and static typing

The last one is probably a sticking point for a lot of people, but as far as I can tell it doesn't seem clear that either dynamic or static typing is obviously better in every context, and it seems like a lot of languages are recognizing that, either by introducing duck typing into a static context (IE, Go, or to an extent templates/generics), or introducing optional type constraints into dynamic languages via hints or asserts or just doing some JIT magic.

Anyway, I just see a lot of convergence. In 2000, different programming languages were really a lot different, in 2014... most of them have a pretty similar feature set.

Re:Future of Programming Languages by tomp on Friday November 28, 2014 @04:20AM (#8670251)
They are all converging on these features because they have proven universally useful. But there is still a lot of work going on about other, new features. Some examples that interest me:

- effects and exceptions - should we use monads (Haskell), macros (Rust), handlers (Eff, algebraic effects), extensible rows (Koka)

- memory usage - how should we handle deallocation - using reference counting with infrequent GC (Python) or by being very careful (C++), using just GC and allocating freely (OCaml/Haskell, Java & Nim use "realtime" GC), using uniqueness semantics (Rust, ATS), using memory pools and great care (Objective C) - none of these approaches is perfect and optimal for all situations, and it's very frustrating that they don't really fit together

- safety and security - I'm really interested about provable programs, either dependent typing (Agda) or refined types (Liquid Haskell, ATS). Both require quite a bit of "static knowledge" - immutable data structures, or unique mutable data structures, and effect annotations for functions (plus, there are additional problems in lazy languages).

All of the above seem really hard to do using a dynamically typed language, but hopefully we can devise a way to have both a dynamic and a static provably efficient and secure code in the same program, same language, with clear split between the two.

Re:Future of Programming Languages by tel on Friday November 28, 2014 @09:18AM (#8670974)
Theorem proving doesn't require immutability it anything like that—its requirements are far more severe. Your language must have at least some fragment which is the internal proof language of a complete and consistent type theory! This is why, for instance, these languages are always Turing incomplete.
Re:Future of Programming Languages by tomp on Friday November 28, 2014 @07:40PM (#8672671)
Hm... I'm not so sure about that. Of course, if we're speaking about dependent types, then yes. However, theorem proving could also be done automatically, by an external theorem prover, which would only need the refined type annotations on your variables to prove stuff (using the whatever theories the theorem prover knows about, such as linear integer mathematics, logic, real nonlinear math, vectors, datatypes, etc).
Re:Future of Programming Languages by tel on Friday November 28, 2014 @09:54PM (#8672923)
That can happen sometimes for some theories. It's super easy to run into places where proof search fails magnificently.
Re:Future of Programming Languages by Dewie on Friday November 28, 2014 @07:13AM (#8670664)
> - memory usage - how should we handle deallocation - using reference counting with infrequent GC (Python) or by being very careful (C++), using just GC and allocating freely (OCaml/Haskell, Java & Nim use "realtime" GC), using uniqueness semantics (Rust, ATS), using memory pools and great care (Objective C) - none of these approaches is perfect and optimal for all situations, and it's very frustrating that they don't really fit together

There is also ML Kit's usage of regions - I guess this is roughly the same std::Arena library in Rust.

Re:Future of Programming Languages by mpweiher on Friday November 28, 2014 @04:02AM (#8670209)
Yesbut: these are features of the language(s) of the past, or at best the present.

I hadn't seen this c2 entry yet and was pleasantly surprised how many of those boxes my own Objective-Smalltalk[1] ticks:

- Borrows from Smalltalk but is not a direct descendant (LISP is also there, but less visibly)

- Dynamic typing as default with static typing as an addition (optional most of the time, not optional when interfacing with C). So far, there is only a rudimentary implementation, but more sophisticated static conversions are planned.

- Suitable for large and small applications. Yep, it does scripting and it does software architecture.

- Open Source. Well, yes.

- OO/Actors + FP. Currently, mostly OO. Higher Order Messaging gives a lot of the HOF/FP flavor, messages will be similar to generic functions (with a few crucial differences). Local vars will be immutable by default.

- Theorem Proving system. No, too big. But yes, you will be able to build one yourself and integrated it into the language as if it were built-in. A big part of making this possible are the flexible scheme handlers that support Polymorphic Identifiers[2], meaning you can define storage variables, while flexible messaging lets you implement sophisticated control structures.

- Scheme handlers + PIs also decouple storage definition from implementation, so you can have multiple implementations of the same schema. Automatic conversion is not built-in, but should be easy enough to build using the extensive meta-programming facilities.

- Simple syntax: yes, first thing I stole from Smalltalk, though it needs extending/adapting here and there to deal with the software architecture aspects.

- Easy to build DSLs. With Polymorphic Identifiers and flexible messaging, this is largely covered (also: the ability to define your own software-architectural connectors is largely isomorphic to being able to build your own language primitives).

- First class relations. Not full there yet, but first class references/variables + connectors means you have all the tools to build these.

- A later comment says 'I'm not sure the future of programming languages is even a "language." I imagine that we'll be connecting components on a bus architecture.'. Again, yes, ObjST's central theme is allowing language users to define architectural styles and then hook up the components.

- Graphical: once you have made your software architecture explicit using custom connectors and components, you will often be able to diagram substantial parts of applications.

[1] http://objective.st/

[2] https://www.hpi.uni-potsdam.de/hirschfeld/publications/media...

Re:Future of Programming Languages by tel on Friday November 28, 2014 @09:15AM (#8670963)
I'd be very interested to see an example of an embedded theorem proving system here. My understanding is that unless your language lives and breathes type theory you cannot embed a proof system.
Re:Future of Programming Languages by mpweiher on Friday November 28, 2014 @09:58AM (#8671074)
Well, considering the c2 entry spoke of a dynamically typed language as base, the authors probably meant something more along the lines of SOURL: http://soft.vub.ac.be/SOUL/