Re: "dict"ionary typing?

"Richard A. O'Keefe" <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 7/12/2013, at 10:59 AM, Carlo Capelli wrote:
> Insofar as functions are just ordered pairs of elements belonging to
> certain domains, that is, insofar as they are thought of extensionally the
> common representation,

But this thread is not about extensionally defined mathematical
functions, but about *computational* functions, indeed about
using functional *syntax* for things that are not mathematical
functions at all.

What I am seeing here is depressingly common in programming.
There's keenness to embrace a syntax, and bickering over the
details of the syntax, and if we are very lucky indeed, after
it is implemented, someone will try to figure out a semantics
for it.

We see things like XML where the definition of XML tangles up
two different ideas of what a document _means_, the original
RDF specification which was _meant_ to define RDF in terms of
the _abstract_ syntax of XML but got the concrete syntax by
mistake, and we saw it over and over and over in AI where
someone would propose a new knowledge representation language
but forget to say what it meant.

There are clearly plenty of people who would like to have
functional notation in Prolog, but can we get some discussion
of how the *semantics* is supposed to work, in detail?

The point of my declaration-based preprocessor was to
ensure that the "functional" notation didn't have _any_
consequences for the run time semantics, but I never wrote
anything about it or released it because it wasn't clear
to me that I had achieved my goal.

With hindsight, I wish that instead of

	Head = Expr [:- Guard]

I had used Erlang-like

	Head -> Expr [:- Guard]

to make it clear that the semantics of (=)/2 was *not* supposed
to be affected.

Why do we want the semantics of (=)/2 to be unaffected?
Well, do *you* want to work out the full details of the
interaction between functional notation and CHR?

Neither did I.

(Functions in dicts have crossed my complexity threshold.)
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.