unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Taylan Kammer <taylan.kammer@gmail.com>
To: mikael@djurfeldt.com, Stefan Israelsson Tampe <stefan.itampe@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: GNU Guile 2.9.9 Released [beta]
Date: Tue, 14 Jan 2020 18:21:08 +0100	[thread overview]
Message-ID: <bc814fcd-820e-6d58-8459-a96e68b36d79@gmail.com> (raw)
In-Reply-To: <CAA2Xvw+MK9+At5msEMESKM2qn-Q4H4jGZ==HOjLLc7hNMBBkYQ@mail.gmail.com>

During the R7RS-small discussion, I remember Will Clinger suggesting to
keep (eqv? proc1 proc2) => #t but unspecifying it for eq?.  Would that
help in Guile's case?  I don't remember the exact optimization he
suggested this for.


- Taylan

On 14.01.2020 17:47, Mikael Djurfeldt wrote:
> It might be reasonable to keep the patch for now in order not to
> introduce novel behavior this short before the 3.0 release.
> 
> But especially in light of Andy's work, I do regret introducing
> procedure-properties. It's a more LISPy feature than Schemey. Did you
> see Andy's argument about procedure equality below?
> 
> I would have preferred to postpone the release and drop procedure
> equality, procedure-properties etc. It can be handy and convenient, yes,
> but there is a reason why R6RS didn't require (eq? p p) -> #t...
> 
> Best regards,
> Mikael
> 
> On Tue, Jan 14, 2020 at 5:37 PM Stefan Israelsson Tampe
> <stefan.itampe@gmail.com <mailto:stefan.itampe@gmail.com>> wrote:
> 
> 
> 
>     ---------- Forwarded message ---------
>     From: *Stefan Israelsson Tampe* <stefan.itampe@gmail.com
>     <mailto:stefan.itampe@gmail.com>>
>     Date: Tue, Jan 14, 2020 at 5:23 PM
>     Subject: Re: GNU Guile 2.9.9 Released [beta]
>     To: Mikael Djurfeldt <mikael@djurfeldt.com
>     <mailto:mikael@djurfeldt.com>>
> 
> 
>     This is how it always have been in guile, without this patch you
>     cannot use procedure-property, use a function as a key to hash maps
>     etc. If this patch goes you need to forbid usage
>     of procedures as keys to hashmap, nuke procedure properties and
>     friends or mark it as internal to avoid luring schemers into using a
>     faulty method. This patch improves the use of higher order functions
>     not risk it. For example I often classify functions into different
>     categories and maintain this information as a property on the
>     function via a hashmap. This is a quite natural way of programming.
>     Without it you need
>     to put the procedures in a datastructure and track that
>     datastructure that will uglify a lot of code. It is manageable but
>     when the opposite is similarly speeded code but much nicer and
>     enjoyable code with absolutely no risk in
>     higher order functionality countrary as you state (because higher
>     order worked flawlessly before in guile and the patch is restoring
>     that).
> 
>     On Tue, Jan 14, 2020 at 5:07 PM Mikael Djurfeldt
>     <mikael@djurfeldt.com <mailto:mikael@djurfeldt.com>> wrote:
> 
>         Hmm... it seems like both Stefan and you have interpreted my
>         post exactly the opposite way compared to how it was meant. :)
> 
>         I completely agree that procedure equality is not strongly
>         connected to the first citizen-ness.
> 
>         What I wanted to say is that I probably prefer you to *reverse*
>         the recent patch because I prefer to have good optimization also
>         when procedures are referenced by value in more than one
>         non-operator position. I prefer this over having (eq? p p) => #t
>         for the reasons I stated.
> 
>         Best regards,
>         Mikael
> 
>         Den tis 14 jan. 2020 15:33Andy Wingo <wingo@pobox.com
>         <mailto:wingo@pobox.com>> skrev:
> 
>             On Tue 14 Jan 2020 13:18, Mikael Djurfeldt
>             <mikael@djurfeldt.com <mailto:mikael@djurfeldt.com>> writes:
> 
>             > I probably don't have a clue about what you are talking
>             about (or at
>             > least hope so), but this---the "eq change"---sounds scary
>             to me.
>             >
>             > One of the *strengths* of Scheme is that procedures are
>             first class
>             > citizens. As wonderfully show-cased in e.g. SICP this can
>             be used to
>             > obtain expressive and concise programs, where procedures
>             can occur
>             > many times as values outside operator position.
>             >
>             > I would certainly *not* want to trade in an important
>             optimization
>             > step in those cases to obtain intuitive procedure
>             equality. The risk
>             > is then that you would tend to avoid passing around
>             procedures as
>             > values.
> 
>             Is this true?
> 
>               (eq? '() '())
> 
>             What about this?
> 
>               (eq? '(a) '(a))
> 
>             And yet, are datums not first-class values?  What does being
>             first-class
>             have to do with it?
> 
>             Does it matter whether it's eq? or eqv?
> 
>             What about:
> 
>               (eq? (lambda () 10) (lambda () 10))
> 
>             What's the difference?
> 
>             What's the difference in the lambda calculus between "\x.f
>             x" and "f"?
> 
>             What if in a partial evaluator, you see a `(eq? x y)`, and
>             you notice
>             that `x' is bound to a lambda expression?  Can you say
>             anything about
>             the value of the expression?
> 
>             Does comparing procedures for equality mean anything at all?
>             https://cs-syd.eu/posts/2016-01-17-function-equality-in-haskell
> 
>             Anyway :)  All that is a bit of trolling on my part.  What I
>             mean to say
>             is that instincts are tricky when it comes to object
>             identity, equality,
>             equivalence, and especially all of those combined with
>             procedures.  The
>             R6RS (what can be more Schemely than a Scheme standard?)
>             makes this
>             clear.
> 
>             All that said, with the recent patch, I believe that Guile 3.0's
>             behavior preserves your intuitions.  Bug reports very welcome!
> 
>             Andy
> 



  reply	other threads:[~2020-01-14 17:21 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13  8:39 GNU Guile 2.9.9 Released [beta] Andy Wingo
2020-01-13  8:44 ` Andy Wingo
2020-01-13 17:26 ` John Cowan
2020-01-13 23:09   ` bug#39118: " John Cowan
2020-01-20 16:35   ` bug#39118: Segfault while building on 64-bit Cygwin Ludovic Courtès
2020-01-20 16:38     ` John Cowan
2020-01-20 17:22       ` bug#39118: " Mike Gran via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2020-02-06 10:53         ` Andy Wingo
2020-02-07  4:56           ` Charles Stanhope
2020-02-14 17:46             ` Charles Stanhope
2020-02-15 17:58               ` Marco Atzeri
2020-02-16 23:23               ` Mike Gran
2020-02-16 23:24                 ` John Cowan
2020-02-17  1:08                 ` Charles Stanhope
2020-02-17 19:27                   ` Charles Stanhope
2020-02-17 21:05                     ` Andy Wingo
2020-01-21  9:01       ` Ludovic Courtès
2020-01-21 18:40         ` bug#39118: " szgyg
2020-01-21 21:53           ` John Cowan
2020-01-21 21:37         ` John Cowan
2020-01-23 20:35           ` Ludovic Courtès
2020-01-24 14:36             ` John Cowan
2020-01-25 13:51               ` Ludovic Courtès
2020-01-25 15:54                 ` John Cowan
2020-01-31 14:23                   ` bug#39118: " John Cowan
2020-02-03 22:11                     ` szgyg
2020-02-05 21:11                       ` John Cowan
2020-02-05 22:42                         ` szgyg
2020-01-13 21:32 ` GNU Guile 2.9.9 Released [beta] Stefan Israelsson Tampe
2020-01-13 21:33   ` Stefan Israelsson Tampe
2020-01-14  9:57   ` Stefan Israelsson Tampe
2020-01-14 11:16   ` Andy Wingo
     [not found]     ` <CAGua6m3+mL-1mq0iot1+xvkgkC-_jnhX03uGpOxQkwk0iv12Vw@mail.gmail.com>
2020-01-14 11:43       ` Fwd: " Stefan Israelsson Tampe
2020-01-14 12:18     ` Mikael Djurfeldt
2020-01-14 13:25       ` Stefan Israelsson Tampe
2020-01-14 14:32       ` Andy Wingo
2020-01-14 14:47         ` Stefan Israelsson Tampe
2020-01-14 16:15           ` Andy Wingo
2020-01-14 16:36             ` Stefan Israelsson Tampe
2020-01-14 17:56               ` Stefan Israelsson Tampe
2020-01-14 16:03         ` Mikael Djurfeldt
     [not found]           ` <CAGua6m2cm2iFTf6EB4MuDR4qNDJ1kt1EjwRCBgLKS+qxncxp+w@mail.gmail.com>
2020-01-14 16:36             ` Fwd: " Stefan Israelsson Tampe
2020-01-14 16:47               ` Mikael Djurfeldt
2020-01-14 17:21                 ` Taylan Kammer [this message]
2020-01-14 17:27                 ` Stefan Israelsson Tampe
2020-01-14 20:54           ` Andy Wingo
2020-01-14 20:13 ` Stefan Israelsson Tampe
2020-01-14 21:17   ` Andy Wingo
2020-01-14 21:48     ` Stefan Israelsson Tampe
2020-01-15 19:58       ` Andy Wingo
  -- strict thread matches above, loose matches on Subject: below --
2020-01-14 14:39 dsmich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc814fcd-820e-6d58-8459-a96e68b36d79@gmail.com \
    --to=taylan.kammer@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=mikael@djurfeldt.com \
    --cc=stefan.itampe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).