* Beginner question: where is defstruct?
@ 2007-10-10 9:14 Josef Wolf
2007-10-10 16:21 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Josef Wolf @ 2007-10-10 9:14 UTC (permalink / raw)
To: guile-user
Hello,
I am about to learn scheme by working through some tutorials. My first
attempt is http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html,
which is suggested from the schemers.org pages.
Now I would like to use structures as described in
http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-11.html
but all I get from guile is
ERROR: Unbound variable: defstruct
In guile's info page, all I can find is chapter 22.5, but this seems
to describe something much more general than what defstruct would do.
BTW: this is guile 1.6.7 as it comes with suse linux 10.0
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Beginner question: where is defstruct?
2007-10-10 9:14 Beginner question: where is defstruct? Josef Wolf
@ 2007-10-10 16:21 ` Ludovic Courtès
2007-10-11 9:36 ` Josef Wolf
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2007-10-10 16:21 UTC (permalink / raw)
To: guile-user
Hi,
Josef Wolf <jw@raven.inka.de> writes:
> In guile's info page, all I can find is chapter 22.5, but this seems
> to describe something much more general than what defstruct would do.
`defstruct' as described in this document is something specific to some
Scheme implementation. The chapter you saw in Guile's manual is another
non-portable way to define structures, in Guile this time.
The most portable way to define structures is to use SRFI-9:
http://srfi.schemers.org/srfi-9/srfi-9.html
It is available in Guile using "(use-modules (srfi srfi-9))" or
"(require-extension (srfi 9))" (the latter being the portable way to get
the portable "structures" :-)).
Hope this helps,
Ludovic.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Beginner question: where is defstruct?
2007-10-10 16:21 ` Ludovic Courtès
@ 2007-10-11 9:36 ` Josef Wolf
2007-10-11 12:29 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Josef Wolf @ 2007-10-11 9:36 UTC (permalink / raw)
To: guile-user
On Wed, Oct 10, 2007 at 06:21:25PM +0200, Ludovic Courtès wrote:
> Josef Wolf <jw@raven.inka.de> writes:
> > In guile's info page, all I can find is chapter 22.5, but this seems
> > to describe something much more general than what defstruct would do.
> `defstruct' as described in this document is something specific to some
> Scheme implementation. The chapter you saw in Guile's manual is another
> non-portable way to define structures, in Guile this time.
>
> The most portable way to define structures is to use SRFI-9:
>
> http://srfi.schemers.org/srfi-9/srfi-9.html
>
> It is available in Guile using "(use-modules (srfi srfi-9))" or
> "(require-extension (srfi 9))" (the latter being the portable way to get
> the portable "structures" :-)).
Thanks for the explanation, Ludovic! I'll go and try to read/understand
srfi-9.
BTW: Why do people teach newbies non-portable things in their tutorials?
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Beginner question: where is defstruct?
@ 2007-10-11 11:55 dsmich
0 siblings, 0 replies; 5+ messages in thread
From: dsmich @ 2007-10-11 11:55 UTC (permalink / raw)
To: Josef Wolf; +Cc: guile-user
---- Josef Wolf <jw@raven.inka.de> wrote:
> Thanks for the explanation, Ludovic! I'll go and try to read/understand
> srfi-9.
>
> BTW: Why do people teach newbies non-portable things in their tutorials?
In this case, I think that tutorial predates the srfi.
-Dale
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-11 12:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-10 9:14 Beginner question: where is defstruct? Josef Wolf
2007-10-10 16:21 ` Ludovic Courtès
2007-10-11 9:36 ` Josef Wolf
2007-10-11 12:29 ` Ludovic Courtès
-- strict thread matches above, loose matches on Subject: below --
2007-10-11 11:55 dsmich
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).