What non-theoretical, practical programming language has no reserved keywords

languagestheory

I have been searching for a practical programming language that has no reserved keywords but I haven't had any luck finding one.

I am working on a programming language for my own edification and entertainment and I haven't needed to include any keywords yet, that is what led me to my search and the question:

I don't see convenience to the compiler writer as being important to the end user of the language. Computers are powerful enough now days to be able to infer meanings from context. No more than a writer needs to label nouns, verbs and such when writing a novel, why should a programmer have to label functions and variables with function x() {} or set x = 1 or var x = 1 etc; when I can infer from the context of the statements that it is a function declaration or an invocation or that a label is an assignment to a value or a reference to that labels value?

Here is a concrete example of what my current parser is doing, no need for reserved keywords to support common things that would normally have a bunch of noise like func or function or dec or what not.

Function Declaration

sum3(a,b,c) -> a + b + c.

Function Invocation

x = sum3(1,2,3).

Anonymous Function Named x

x = (a,b,c) -> a + b + c.
y = x(1,2,3).

I would like to know why are keywords that important to a successful programming language?

Best Answer

MUMPS is highly successful, being widely used in insurance and healthcare and and has no reserved words. I'd say they help in terms of writing clearer code but they aren't strictly necessary. APL is another example. APL sees use for one-off scripts in the Nuclear Industry amongst others. J, a member of the APL family also lacks keywords.

Keywords help compiler writers implement parsing more easily. APL is famously right associative. They also help reinforce conventions and improve readability. APL is not known for being hugely readable to most.

Related Topic