David
David

Reputation: 14963

What is the most concise programming language?

What is the most concise programming language? in case a criteria is needed for conciseness: on balance requires the least amount of characters to create any given program.

Upvotes: 14

Views: 6916

Answers (7)

sailfish009
sailfish009

Reputation: 2927

brain itself, current programming language isn't concise/compact enough.

may be future programming language much like brain itself.

just like what deep learning archives in vision classification area.

Upvotes: -2

Earlz
Earlz

Reputation: 63935

APL, hands down.

Game of life in one line:

alt text
(source: catpad.net)

Upvotes: 34

Behnam Moh
Behnam Moh

Reputation: 111

As yassin pointed out, for daily use, functional programming languages offer more terseness. Haskell seems a great example: the "xmonad" window manager was written in less than 1000 lines of code!

While not directly related to the question, it's also interesting to know that xmonad doesn't crash, because a theorem prover was run over the code to prove it wouldn't crash! 1

Upvotes: 1

yassin
yassin

Reputation: 6707

I think it's APL (or one of its dialects). For example, to find all primes between 1 and R, this code works:

(~R∊R∘.×R)/R←1↓⍳R

However, to a daily use, I think any functional language (F#, for example) is very concise, since you only express what you want to do, not how.

Upvotes: 10

Pyrolistical
Pyrolistical

Reputation: 28036

Binary.

The zeroes and ones are then interpreted as x86 code.

There really isn't a good answer here

Upvotes: 5

Andrew Hare
Andrew Hare

Reputation: 351758

The Whitespace programnming language only allows three characters (space, tab, and newline).

Upvotes: 9

David
David

Reputation: 7153

J, a descendant of APL.

Sample J implementation of quicksort (whitespace for clarity):

quicksort =: (($:@(<#[) , (=#[) , $:@(>#[)) ({~ ?@#)) ^: (1<#)

Upvotes: 11

Related Questions