Re: 0-arity compound terms (was: Ann: SWI-Prolog 7.1.0)

"Richard A. O'Keefe" <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
I wouldn't be bothered in the least by allowing
	foobar()
as syntactic saccharine for
	foobar

I also think that if you want "more conventional-looking" domain
specific languages, it is a mistake to try to force Prolog syntax
to accommodate them.   Let's say I want to embed F# in Prolog.
(And why not?  F# has a bad case of the uglies, but it's a very
_useful_ language.)  It has perfectly conventional bracketed
comments using the perfectly conventional "(*" opener and "*)"
comment brackets and as is quite conventional, these things nest.
So should Prolog accept these things as well?

And while we're on the subject of strings, there is of course
the well known convention of using \ for character escapes,
except that (a) some languages use *, (b) some languages use %,
and (c) no two languages agree on what all the escapes are.
You'll find \010 meaning either BS or LF.

Trying to make one language look like another, unless you can
do a nearly complete job of it, just puts up the error rate.
Frequent sharp reminders that you _aren't_ in Kansas any more
are actually a big help.

I find that the Haskell community have got an amazing amount of
benefit out of making their embedded languages look like Haskell
rather than the other way around.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.