guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ADD type-of


From: Nala Ginrut
Subject: Re: ADD type-of
Date: Tue, 27 Dec 2011 15:29:48 +0800

hi Daniel, thanks for reminding me.
So the patch for GOOPS is redundant.

On Tue, Dec 27, 2011 at 3:17 PM, Daniel Hartwig <address@hidden> wrote:
On 27 December 2011 14:24, Nala Ginrut <address@hidden> wrote:
> A newbie Guiler asked me if there's something like "typeof" as "type" in
> Python or "typeof" in JS.
> I can't remember there's such a thing. But I think it'll provide
> some convenient for a newbie to learn Guile.
> Here's my patch.
> What you guys think?

GOOPS has `class-of'[1] and `class-name':

scheme@(guile-user)> (use-modules (oop goops))
scheme@(guile-user)> (class-of 12)
$1 = #<<class> <integer> 99bef78>
scheme@(guile-user)> (class-name $1)
$2 = <integer>


[1] http://www.gnu.org/software/guile/manual/html_node/Instances.html


reply via email to

[Prev in Thread] Current Thread [Next in Thread]