Which programming language has the least amount of syntax? How can I calculate how many syntax a programming language has?
Thanks.
Join Stack Overflow to learn, share knowledge, and build your career.
Which programming language has the least amount of syntax? How can I calculate how many syntax a programming language has?
Thanks.
LISP-derived, Forth-derived and Smalltalk-derived (IO?) languages probably have the least syntax, in that order.
And you can't measure it, because it's not technical, it's social.
Programming languages that are implemented very close to some simple computational model are likely to have very little syntax.
A Hello World in Brainfuck
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
If I guess your purpose correctly, Python has no more or less "syntax" than any other language, but it has less "strange funny symbols" than any other language I know. And it uses simplified, mostly plain English syntax.
If you're looking for a serious language in which it'd be easy to read and write, but still be prouctive, go for Python.
Or visual basic, which is becoming more and more bloated over the years, and it has syntax incompatibility issues with earlier versions - so I can't recommend VB.
It rather depends on your definition of syntax. For example, Subtext no textual syntax, but quite a lot of visual syntax.
Not sure about "least" amount of syntax, but if you mean succinct/lightweight, then undoubtedly the K language has to be a strong competitor.
Most modern languages have relatively few keywords and operators. They usually have some way of indicating a logic block. The problem is that fewer keywords and operators don't usually mean easier to read and understand code - just look at BrainFuck - 4 operators, no keywords and pretty useless.
More 'natural' languages are more verbose and have a lot of syntax, but can be easier for a beginner.
Java, C#, Javascript and loads more languages share the same basic syntax. They all have their own extra keywords and operators, but if you're going to learn one basic syntax their's is where to start - if you can code in one you can read the others.
As far as I can tell, I tried :
Excepting bash, wich I do not even thing about when it comes to programming more that scripting, Perl has the shortest syntax, but it's one of the slowest to read.
Assembly, C/C++, and Java are really Verbose. C# and PHP less, but still. And you are stuck with .Net or with a language with no naming convention.
The best balance between being concise, powerful and readable are Ruby and Python.
I am a Python lover myself, and I'm use to the syntax so I'll go for it. I don't like the way Ruby ends blocks using keywords.
The parsing of Jot can be done using only 5 characters: the [01]*
regex is a full description of all and only legal programs.
I've a supposition that the relative complexity of a language is a function of the number of items a programmer has to know or remember to successfully get a module to compiile without errors. There are other things to enumerate in addition to keywords, like special symbols. Perhaps listing those symbols and delimiters would be useful as well. If a symbol is used for two different things it would be counted twice. For instance, in Smalltalk a period (.) is used to address a class explicitly through its namespace and to terminate a statement.
Language Keywords 68000 Assembler >106 8088 Assembler 106 Ada 84 Java 1.1 64 Ruby 56 PHP 52 74 including special $variables C++ 48 Ruby 38 C 28 Python 28 Smalltalk 6
the compute programming language has no syntax. At all. http://esolangs.org/wiki/Compute I must point out however that it cant actually do math.