
W – A simple programming language - networked
https://www.vttoth.com/CMS/projects/49-w-a-simple-programming-language
======
vorg
I particularly like the keywordlessness of W's syntax. Virtually every other
language divides identifiers into 2 arbitrarily defined classes: the somewhere
from 20 to 100 special identifiers that mustn't be used, and all the others
that can be used by the programmer. Because W's syntax uses punctuation and
symbols for all its functionality, the programmer doesn't need to either
remember which 50-ish identifiers not to ever use, or have a special IDE-like
task running in the background to gives prompts whenever it detects an illegal
identifier use. Very clean syntax!

~~~
hacker_9
..sorry but this is a non-problem. If you insist on not using an IDE, then the
compiler will still catch any keyword clashes as errors. Also most languages
use contextual keywords so it's even less of a problem.

~~~
sdegutis
Right. I think I've never wanted to name a variable "if".

~~~
paulddraper
But what about old, current, and new?

Or int?

Or class?

There is more then one project out there with klass.

~~~
Retra
I name variables 'old', 'current', and 'new' all the time. Just not in
C++/Java.

And why would you want to name a variable 'int'?

~~~
paulddraper
Or in JS. Or in C#. That covers a lot of the big ones.

Perhaps you should name your language, so I can provide better examples.

~~~
Retra
Examples of what? Ways to name variables so they look like keywords? I don't
need your help with that. Even if I used a language that used keywords like
'ssalc' and 'wen', you could contrive some reason to be upset that you can't
use those words in your code. The advantage offered by keywords is
readability, and it comes at the expense of your ability to use those words
for other purposes. If that's unacceptable, then your priorities are probably
misplaced.

Plus, you can always use a grammar that distinguishes between keyword rules
and variable rules, and you'll never have any unambiguity. Even if popular
languages don't do this, that's not a general problem for computer languages.

~~~
paulddraper
> Ways to name variables so they look like keywords? I don't need your help
> with that.

Oh good. My comment was in response to someone who doubt keywords would ever
make good variable names (e.g. class).

> you can always use a grammar that distinguishes between keyword rules and
> variable rules, and you'll never have any unambiguity.

Yes, that is nice. And that's what W does. As an ancestor comment said, kudos
for a "clean syntax"!

(NOTE: there are alternatives, e.g. Scala's backticks. But W's choice is a
good one.)

------
Svip
I think he needs to update his grammar.[0] The definition of _program_ does
not allow for anything but _definition_ s (i.e. declarations), except in
blocks (see _compound-expression_ ).

So his examples in his tutorials[1] do not conform to the grammar described,
e.g. conditional expressions.

[0]
[https://www.vttoth.com/CMS/index.php/projects/14-w-compiler/...](https://www.vttoth.com/CMS/index.php/projects/14-w-compiler/51-w-syntax-
specifications) [1]
[https://www.vttoth.com/CMS/index.php/projects/14-w-compiler/...](https://www.vttoth.com/CMS/index.php/projects/14-w-compiler/50-w-a-
brief-tutorial)

------
reacweb
According to [http://gtello.pagesperso-
orange.fr/hp200lx_f.htm](http://gtello.pagesperso-orange.fr/hp200lx_f.htm)
turbo pascal works very well on HP 200LX.

~~~
timonoko
Everything works on HP200LX. Except Emacs, but there was some C-script-based
Emacs, which was OK. I think had Smalltalk and serial mouse at one time, as an
extreme example.

HP200LX was my only computer 1993-1995, if I wanted to see some color pictures
I went to see library computer. It was my travelling companion for 20 years
upto 2010, mostly as an E-book reader.

------
mdjt
We've almost run out of single letter programming language names!

~~~
dagw
Assuming Wikipedia is up to date, we still have: A (there is however a A+
langugae),H,I,L,N,O,P,U,V,X,Y and Z left

~~~
taylorfausak
I know of a tiny language called Z:
[http://chrisdone.com/z/](http://chrisdone.com/z/)

------
AstroJetson
Interesting that he's making things to run on his HP200LX. I (still) have a
Zeos Pocket PC that I used daily for about 2 years. MSDOS and MS-Works was my
world. Ahh, good times...

[http://www.oldcomputers.net/zeos-ppc.html](http://www.oldcomputers.net/zeos-
ppc.html)

------
talideon
Vaguely related (due to the similar naming):
[https://github.com/catseye/Specs-on-
Spec/blob/master/star-w/...](https://github.com/catseye/Specs-on-
Spec/blob/master/star-w/star-w.markdown)

------
d_theorist
>So why would anyone in his right mind would create a whole new programming
language? Isn't BASIC or C++ good enough already?

Ha ha ha!

