Rationale for some idiosyncratic conventions in Prolog?
From: Brian Hulley (brianh_at_metamilk.com)
Date: 02/27/05
- Previous message: desert_bise: "modifying a given list."
- Next in thread: Joachim Schimpf: "Re: Rationale for some idiosyncratic conventions in Prolog?"
- Reply: Joachim Schimpf: "Re: Rationale for some idiosyncratic conventions in Prolog?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Feb 2005 01:57:28 -0800
Hi -
I'm wondering why equality and inequality under the standard order is
specified by using X == Y and X \==Y instead of X @= Y and X @\= Y when
all the inequalities have the convention that the comparison functor
starts with a @ sign.
Also, why does compare(Symbol, X, Y) return '>' '<' or '=' instead of
'@>' '@<' or '==' since the first 3 symbols have nothing in common when
converted to predicates for their respective functors of arity 2: '='
means unification and '<' means arithmetic less-than.
I'm just wondering since idiosyncracies like these are what can make it
difficult for a beginner to understand Prolog, and it seems a great
pity if we have to perperuate these badly thought out conventions just
for historical reasons (like the terribly ill precedence of bitwise & |
in C, C++, C#, Java etc which means compilers always have to issue a
warning because the standard precedence is never what you'd expect (& |
~ should bind tighter than any other arithmetic ops since they are much
"closer to the metal"))
Would it be worth modifying the ISO standard?
- Previous message: desert_bise: "modifying a given list."
- Next in thread: Joachim Schimpf: "Re: Rationale for some idiosyncratic conventions in Prolog?"
- Reply: Joachim Schimpf: "Re: Rationale for some idiosyncratic conventions in Prolog?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|