Rationale for some idiosyncratic conventions in Prolog?

From: Brian Hulley (brianh_at_metamilk.com)
Date: 02/27/05

  • Next message: tmp123: "Re: modifying a given list."
    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?


  • Next message: tmp123: "Re: modifying a given list."

    Relevant Pages

    • Re: Rationale for some idiosyncratic conventions in Prolog?
      ... > I'm wondering why equality and inequality under the standard order is ... > all the inequalities have the convention that the comparison functor ...
      (comp.lang.prolog)
    • Re: On writing negative zero - with or without sign
      ... But we're talking about the Fortran standard here, ... What's to prevent some new generation of computer and compiler to come ... Suppose the convention was changed such that an extra bit was ... answer is *exact* zero. ...
      (comp.lang.fortran)
    • Re: bad-idea-p?
      ... pointing out an obvious ambiguity in the convention -- that it really ... And then when someone decided to test for ideaness they would be expected to parallel bad-idea-p with idea-p? ... Intriguing, not what I was thinking, and given the standard lack of interest in consistency people keep quoting to me I would expect ideap to fit right in even with a bad-idea-p toehold. ... Another thing being missed is folks not reading the whole thread, where they would discover I pointed all this out to the first bozone molecule that did quote me the convention. ...
      (comp.lang.lisp)
    • Re: which bid created the problem?
      ... I don't think anyone made "preemption" the main argument. ... do with the convention. ... Notrump that's so standard that it's unusual *not* to play it. ... I do think in Bridge World Standard, 1D - 3H is a splinter bid. ...
      (rec.games.bridge)
    • Re: extern "C" ... again
      ... So, there is a convention, not a standard or rule. ... language or language implementation, ... Is there anything written in the Standards of any of the two languages about how such interfacing is to be done at the compiler level? ...
      (microsoft.public.vc.language)