smalltalk analogy of a scheme expression

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

smalltalk analogy of a scheme expression

Unconditional
In scheme,

(+ 3 4)

is to

'(+ 3 4)

As, (In smalltalk)

3 + 4

is to

[+ 3 4]

??? correct? bees in the bonnet? what do you say? ???

m.


       
____________________________________________________________________________________
Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

RE: smalltalk analogy of a scheme expression

Ramon Leon-5
> In scheme,
>
> (+ 3 4)
>
> is to
>
> '(+ 3 4)
>
> As, (In smalltalk)
>
> 3 + 4
>
> is to
>
> [3 + 4]
>
> ??? correct? bees in the bonnet? what do you say? ???
>
> m.

No, [3 + 4] == (lambda () (+ 3 4)) in Scheme.

I could be wrong (I don't think I am), but I don't believe Smalltalk has any
syntactical equivalent to a quote to turn code into a data structure.

Ramon Leon
http://onsmalltalk.com 

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: smalltalk analogy of a scheme expression

Roel Wuyts-2
The result of quoting in Scheme is the meta-level representation of
the quoted expression.

The equivalent of
'(+ 3 4)
in Smalltalk is the parse tree representing the expression 3+4


On 9/25/07, Ramon Leon <[hidden email]> wrote:

> > In scheme,
> >
> > (+ 3 4)
> >
> > is to
> >
> > '(+ 3 4)
> >
> > As, (In smalltalk)
> >
> > 3 + 4
> >
> > is to
> >
> > [3 + 4]
> >
> > ??? correct? bees in the bonnet? what do you say? ???
> >
> > m.
>
> No, [3 + 4] == (lambda () (+ 3 4)) in Scheme.
>
> I could be wrong (I don't think I am), but I don't believe Smalltalk has any
> syntactical equivalent to a quote to turn code into a data structure.
>
> Ramon Leon
> http://onsmalltalk.com
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners