From: Alan Grover <awgrover@mail.msen.com>
Cc: bug-guile@gnu.org
Subject: Re: Anomalous results from is-a? and instance? on current-input-port
Date: Wed, 16 Feb 2005 06:55:44 -0500 [thread overview]
Message-ID: <421334C0.8090600@mail.msen.com> (raw)
In-Reply-To: <66e540fe05021603207b85c7a9@mail.gmail.com>
It's confusing to have an "object" with class, superclasses, etc., but
not be "an instance". Since "class-of" returns a value (the Goops
class), that implies it is a Goops instance.
What would be the predicate for determining that something is an
instance of a class, capable of the introspection procedures, works with
specialization by inheritance, but not a Goops object?
Mikael Djurfeldt wrote:
> On Tue, 15 Feb 2005 18:39:44 -0500, Alan Grover <awgrover@mail.msen.com> wrote:
>
>>Guile 1.6.4
>>Linux xxxx 2.6.5-7.145-default #1 Thu Jan 27 09:19:29 UTC 2005 i686 i686
>>i386 GNU/Linux
>>SuSe 9.1
>>
>>Some instance and class introspection procedures give anomalous results.
>>Specifically, they seem to give false when they shouldn't.
>>
>>My results (from code below, just for current-input-port). Note the #f's":
>>; from interactive guile
>>(class #<<class> <soft-input-port> 8087280>
>> instance? #f
>> (is-a? <soft-input-port>) #f
>> class-direct-supers (#<<class> <soft-port> 80872b0> #<<class>
>><input-port> 8084110>)
>> (is-a? <input-port>) #t
>>
>>Results are repeatable if tried in the same interactive interpreter, or
>>run from a script. However, I get the following variations:
>>
>>* Run from a script: (is-a? <soft-input-port>) #t
>>* Use my .guile: (is-a? <soft-input-port>) #t
>
>
> * instance? should give #f since the port is not a normal GOOPS
> instance but rather a built-in datatype.
>
> * the class-direct-supers list looks OK
>
> * (is-a? <input-port>) gives the correct value #t
>
> The only thing anomalous above is that (is-a? x <soft-input-port>)
> gives #f in the interpreter.
> I can't repeat that in the development version, so it seems specific
> to Guile-1.6.4. Can someone else look into that?
>
> Thanks,
> M
--
Alan Grover
awgrover@mail.msen.com
+1.734.476.0969
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
next prev parent reply other threads:[~2005-02-16 11:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-15 23:39 Anomalous results from is-a? and instance? on current-input-port Alan Grover
2005-02-16 11:20 ` Mikael Djurfeldt
2005-02-16 11:55 ` Alan Grover [this message]
2005-02-16 12:40 ` Mikael Djurfeldt
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=421334C0.8090600@mail.msen.com \
--to=awgrover@mail.msen.com \
--cc=bug-guile@gnu.org \
/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).