

The genesis of the perfect programming language - steeleduncan
http://slidetocode.com/2012/05/06/the-perfect-programming-language/

======
qznc
I'm pondering this perfect language myself quite often. So far, I have only
published what this language should _not_ contain:

<http://beza1e1.tuxen.de/articles/proglang_mistakes.html>

~~~
ggchappell
That's a nice article. But I feel like tweaking something in it.

> The programmer should be able to use Unicode, so the source file _must_
> declare its encoding.

Another Great Lesson we've learned, is to avoid clutter. So a reasonable rule,
IMHO, would be that any standard Unicode encoding can be declared, but the
lack of such a declaration is equivalent to a declaration of UTF-8.

~~~
lolcraft
We also learned to only use UTF-8, so we _should_ make it yet more simpler :)
[1] Really, why declare the encoding of source code, given that we do have a
universal character set and an endian-agnostic, compact representation?

[1] <http://www.utf8everywhere.org/>

------
mgurlitz
The author conflates quite a few unrelated concepts. Monads with "interfaces
and object models," and templates with type inference. Perhaps in the
programmer's head these all serve similar functions (often erroneously. See,
e.g. [http://blog.tmorris.net/type-classes-are-nothing-like-
interf...](http://blog.tmorris.net/type-classes-are-nothing-like-
interfaces/)), but language designers need to make clearer distinctions.

------
cbsmith

        Even C++, OOP's flagwaver-in-chief, now supports
        templating, which is effectively a competing compile
        time strategy for writing polymorphic code.
    

When did C++ become OOP's flagwaver-in-chief!?!? It's a multi-paradigm
language and hasn't been held up as an OOP exemplar for like 2 decades.

------
freyrs3
The author seems mistaken about the purposes of Monads in Haskell. The essence
of monads is control flow, not encapsulating code or providing interfaces.

~~~
cbsmith
I was confused by this reference too. I'm still trying to figure out what the
author meant by that.

------
Tloewald
Rubymotion is built around a slightly restricted ruby that compiles to llvm. A
non iOS focused version would seem to fit the criteria.

Along similar lines, Unity uses a slightly restricted JavaScript than compiles
to Mono's CLR implementation, as well as Boo, which is a Python-like language
that also compiles to Mono. Iron Python, of which I have no direct experience,
is another example.

And of course there's Clojure if you're so inclined.

------
paulsutter
I can't recall a single instance of language being an actual issue when
solving a business problem, and I've been programming for over 30 years.
Discussions about language can be tiresome, but languages themselves havent
been a problem.

The only real problem I know of with languages is that they don't die off fast
enough. If the perfect language arrived tomorrow, it would be lost in the sea
of languages anyway.

A language debate is a sign the there is an extra language lurking and it
should die off. Python vs Ruby is a lively debate. I don't care which one
survives, but do we really need both? The most curious debate of all is
"Haskell?", a debate that seems to exist apart from any other language, the
clearest sign of a lurking "extra" language.

~~~
Tuna-Fish
Haskell isn't, and isn't trying to be, the next big language. Haskell is first
and foremost a vehicle for programming language research, and it's primary
proponents aren't shy about that. As such, it has been extraordinarily
successful, and necessary.

------
kibwen
_the only Objective-C feature I miss when coding in other languages is named
arguments(e.g. [self drawRectOfSize:size atPoint:point inColour:colour]).
Doxygen, rdoc, javadoc and similar tools do a great job of generating API
documentation from source, but I prefer the self-documenting nature of
Objective-C method calls._

This sentiment seems to be at odds with the preference of

    
    
      abs(val) {
    

over

    
    
      int abs(int val) {
    

I'm all for type inference, I think it's wonderful. But if there's anywhere
where I _do_ want types to be explicit, it's in function signatures.

~~~
tomp
An interesting idea is for the types to be inferred, but not everytime you
compile the code, but only the first time, then the compiler edits the source
and adds the infered types. Or an IDE could do that.

~~~
andrewflnr
I prefer my compiler to be a pure function. What if I'm generating source code
and sending it over a pipe? I prefer not to need an IDE, either, though that's
a tad more subjective.

------
jhuni
> _I've no complaint with this, but it leads to the mistaken impression that
> great applications are written in dynamic languages. They aren't. Great
> prototypes are written in dynamic languages, but the lasting replacement
> will be written in a dull typed language like Java/C++/C#._

Common Lisp is the only programming language I know of that provides both the
prototyping power of dynamic languages and the execution power of static
languages. This is achieved through the Lisp declarations system.

The maxima computer algebra system also offers a variety of algebraic
declarations such as linear, additive, multiplicative, outative, evenfun,
oddfun, commutative, symmetric, antisymmetric, nary, lassociative, and
rassociative. In my opinion all programs should be written this way - the Lisp
way.

> _So far my fondness with Scheme has coexisted with disappointment at its
> unsuitability for real world tasks_

I am fond of Scheme, Kernel, Arc, Shen and many other Lisp dialects. The
unsuitability of these languages for real world tasks can be solved to some
extent by embedding them in a larger host platform. Clojure does the embedding
approach quite nicely.

------
thurn
> I've no complaint with this, but it leads to the mistaken impression that
> great applications are written in dynamic languages

Right, except for Facebook, Twitter, Reddit and Wikipedia (yes, Facebook has a
different PHP runtime which uses gcc to get a performance boost, this is an
irrelevant implementation detail).

~~~
elchief
Twitter was Ruby but moved to Java.

~~~
glogla
The last thing I know was they moved from Ruby to Scala. Did they move to Java
without me noticing or do you mean Scala by Java (since it's a JVM language
too)?

EDIT: according to Wikipedia the service itself moved from Ruby to Scala while
search moved from Ruby to Java.

~~~
elchief
Twitter was Ruby but moved to Scala and Java :D

------
errnoh
Go! and Go are different languages btw, you probably should fix that on your
post :)

------
mwsherman
I’ve come to see programming languages, like applications, as a collection of
features bound by a narrative. (By ‘narrative’, I mean a set of styles and
goals that allow one to make particular implementation decisions.)

------
cageface
Language design, like most engineering, is all about weighing tradeoffs. There
may be a language that's ideal for a particular application but there will
never be a perfect language.

~~~
SoftwareMaven
The difference between Jython and CPython may tell a slightly different story:
with them, you have the same language but different implementations that may
be more appropriate in one circumstance than another. If you really want to
utilize threads to accomplish your goal, use Jython (yes, there are ways to do
the same thing in CPython). If you want very fast startup, use CPython.

Maybe there could be a single, perfect language with different implementations
providing the tradeoffs. The most difficult challenge may be bridging the
performance/productivity gap between the C's and the Pythons of the world, but
that may be a side effect of making multi-core programming easier. Amdahl's
law[1] may prohibit that, though.

1\. <http://en.wikipedia.org/wiki/Amdahls_law>

~~~
cageface
Static vs dynamic typing, OO vs procedural, stateful vs functional/pure etc
all have intrinsic strengths and weaknesses. You can only compensate for so
much in implementation. Python will always be a bad language for writing
kernels, for example.

------
drucken
Go is not the solution. It has a mandatory GC.

"need for a multithreading-centric, statically typed, type inferred language
that compiles to native code but possesses the feel, readability and
programmer efficiency of Python."

Language designers have moved on to writing on-top of LLVM to provide the
native code benefit. That includes even Apple, Objective-C's backer. Of these,
the highly interesting languages that provide the other benefits demanded:

Julia

Rust

Clay.

------
kemiller
People have been searching for the One True Language for decades. Why is it so
important that there be one? The interfaces we use to talk between components
are so much more important, so that we can use what fits for different parts.

~~~
jhuni
> _People have been searching for the One True Language for decades._

The one true language is mathematics. John McCarthy (a math professor)
discovered that programs could be represented as out degree one directed
graphs (cons cells) that compose mathematical functions (lambda expressions).
These simple mathematical principles form the basis of the functional
programming paradigm and they have led Lisp programmers to success for nearly
a half a century.

------
anuraj
"Great prototypes are written in dynamic languages, but the lasting
replacement will be written in a dull typed language like Java/C++/C#" That is
the gist.

------
darkstalker
currently my "perfect" language is D <http://dlang.org>

~~~
Jimmie
Cross platform support is king for me right now which means Java and
Javascript are getting a good run even though I don't much like the languages
themselves.

How easy is it to take a D program cross platform? Can it cross compile
easily?

~~~
rubashov
The gdc compiler sticks the D front end over gcc, so cross compiling is the
same as with gcc/mingw, to the best of my understanding. LDC is another
compiler that uses the LLVM backend and it might support cross compiling, I
don't know.

Setting up a virtualbox and building from that is pretty easy these days. And
you need to test the executables somewhere anyway.

D will be perfectly portable by default, just as with modern C++. If you use
the standard library it will compile and run everywhere.

~~~
cbsmith
If it uses the LLVM backend... that kind of means it is as portable as LLVM,
no?

------
tomc1985
Why does everyone seem so obsessed over typed vs. untyped? Why are typed
languages so undesirable to "hardcore" uses?

~~~
tikhonj
What gives you the idea that statically typed languages are undesirable to
"hardcore" users? If anything, I've seen the opposite--the really advanced
programmers (especially those who specialize in programming languages) seem to
prefer statically typed languages.

Of course, there is some serious selection bias here for me, largely because
programming language design has been one of my primary interest lately, and as
I said earlier, the field seems generally biased _towards_ static typing.

~~~
tomc1985
Actually that was a typo... I can't go back and edit it now... I meant to say
"desireable" :-)

