Re: Languages which syntax use minimal punctuation?
- From: "Rob Thorpe" <robert.thorpe@xxxxxxxxxxxx>
- Date: 12 Jul 2006 15:13:03 -0700
toby wrote:
goose wrote:
toby wrote:
goose wrote:
Logan Shaw wrote:
casioculture@xxxxxxxxx wrote:
What languages use very few punctuation characters in their syntax? I
can think of lisp and forth. Perl on the other hand is full of
punctuation characters. What else?
I can't really imagine how this question is all that meaningful.
From a theoretical perspective, there is no difference.
Its significant if you want to parse the language; punctuation
characters usually add nothing to the logic but requires more
work to decode by the computer.
?!
Hm? My clarity may leave something to be desired; let me try
that again :-).
If you want to write a program thats scriptable,
less punctuation = less work to write a parser.
I use flex/bison.
Anyway, you actually said not that it was harder to "write a parser",
but:
"requires more work to decode by the computer", which is nonsense.
Actually it isn't really. (I know this isn't what goose meant).
It is possible to make faster lexers for languages with less
punctuation. This is because normally each input character must be
tested with "if" to see what it is and a token emitted, the fewer if
tests are required the better. Another possible design is to add the
character to a number, and jump to the resulting address. This doesn't
work so well on modern computers though (it stops the branch predictor
working).
Also for simpler languages more of the lexer & parser fit in the cache.
In many cases the difference is very small though, and most often it
buried in other larger consumers of cycles. In some cases it might be
relevant though.
.
- References:
- Languages which syntax use minimal punctuation?
- From: casioculture
- Re: Languages which syntax use minimal punctuation?
- From: Logan Shaw
- Re: Languages which syntax use minimal punctuation?
- From: goose
- Re: Languages which syntax use minimal punctuation?
- From: toby
- Re: Languages which syntax use minimal punctuation?
- From: goose
- Re: Languages which syntax use minimal punctuation?
- From: toby
- Languages which syntax use minimal punctuation?
- Prev by Date: CVS, Subversion, GNUArch or eclipse??
- Next by Date: Re: Languages which syntax use minimal punctuation?
- Previous by thread: Re: Languages which syntax use minimal punctuation?
- Next by thread: Re: Languages which syntax use minimal punctuation?
- Index(es):
Relevant Pages
|