

Ask HN: Most difficult programming language? - redxblood

Curiosity here. 
Lists descending in difficulty would be nice too.
======
rustc
What do you mean by "difficult" here? Do esoteric programming languages like
Malbolge[1] count?

"Hello World" in Malbolge:

    
    
        ('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>a=<M:9[p6tsl1TS/
        QlOj)L(I&%$""Z~AA@UZ=RvttT`R5P3m0LEDh,T*?(b&`$#87[}{W
    

[1]:
[http://en.wikipedia.org/wiki/Malbolge](http://en.wikipedia.org/wiki/Malbolge)

~~~
nithinbekal
If we're considering esoteric languages, Brainfuck would probably win. :)

"Hello World" in Brainfuck:

    
    
        ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

~~~
Someone
That depends a bit on how one measures difficulty. Brainfuck is hard to read
only because its operators are so limited, and is not that hard to write; for
a Turing machine, it is fairly powerful, and it has [ and ] to jump around.

Intercal, IMO, is more difficult, but it would not be that hard to improve on
it. For example, one could bring back the joy of delay line memory
([http://en.wikipedia.org/wiki/Delay_line_memory](http://en.wikipedia.org/wiki/Delay_line_memory))
by having some metric for the complexity of a statement, and having the
computer skip some statements depending on that complexity. Ideally (for the
goal of complicating the language), the complexity of a statement would depend
on the runtime values of variables. For example, 'A = B * C' is easy when
C=10, a bit harder when it is 11, and harder still when C=13, unless, of
course, B equals zero or one. Similarly, 'IF A > 7' is easy when A is <= 3 or
>= 20, but hard for intermediate values. Of course, a true language would not
use such simple notions of complexity. The complexity of 'A = B * C' should
also depend on the number of binary carries (better yet, use a mixed-base
number system), and, of course, the delay of 'OUTPUT X' depends not only on
the length of X, but also on the question whether this flushes the output
buffer.

And, of course, the only way of control flow should be something like Cobol's
ALTER, all statements should be executed probabilistically, and the language
should be a funge in some weird topology (while at it, change the topology
when certain conditions apply (number of statements executed modulo 34567
equals 325, number of 1 bits in variable memory is a prime, it's Monday
morning, but not a full moon, etc)

------
nithinbekal
I recently read about BANCstar, and it seems like a good contender. 0-9,
comma, minus sign and return are the only legal characters in it, and despite
that, it's actually used in serious applications.

[http://en.wikipedia.org/wiki/BANCStar_programming_language](http://en.wikipedia.org/wiki/BANCStar_programming_language)

Here's an article about it:

[https://github.com/jloughry/BANCStar](https://github.com/jloughry/BANCStar)

~~~
ksherlock
BANCStar is a VM. You could program the JVM or .net CIL or any real machine
using only octal (0-7 and white space only!) and it would be just as bad. Most
people have enough sense not to do that, though.

------
satyampujari
Whitespace:

[http://en.wikipedia.org/wiki/Whitespace_(programming_languag...](http://en.wikipedia.org/wiki/Whitespace_\(programming_language\))

Here are some cool answers:

[http://stackoverflow.com/questions/18330/what-is-the-
hardest...](http://stackoverflow.com/questions/18330/what-is-the-hardest-
language-to-learn)

[http://www.tuxradar.com/content/programming-languages-
melt-y...](http://www.tuxradar.com/content/programming-languages-melt-your-
brain)

------
bulte-rs
<insert random language> when used in a badly designed project, maintained by
10+ dev's in 15+ different styles using 20+ different external dependencies
written in 25 days.

Seriously: I'd go for befunge or malebolge.

------
wglb
Here is my nomination, based on the criteria of having spent significant time
in it: RPG-III. The opposite of awesome.

I would much rather program in assembler, such as Sigma-7.

But difficulty is kind of a vector, really.

------
joshbaptiste
Ok, what non esoteric languages would one consider extremely difficult?

~~~
Q4273j3b
I mean, how "extremely difficult" are we talking? So long as it isn't
esoteric, it can't be _so_ difficult... otherwise no one would learn it, and
it would become by definition esoteric...

I guess "real hard but still non-esoteric" could include * Functional ones
like OCaml or Haskell (so I hear... "What are these monads you speak of?") *
Super legit ones like C/C++ for systems programming * Rare and majestic ones
like Lisp * Ones that require outside math knowledge like Julia or Fortran *
Really new ones that don't have many packages / docs / community members yet

------
zombio
Pure binary.

