« Return to Thread: Under the hood.

Re: Under the hood.

by tobeythorn :: Rate this Message:

Reply to Author | View in Thread

--- In iolanguage@..., Jeremy Tregunna <jeremy.tregunna@...> wrote:

>
>
> On 4-Jun-09, at 11:31 AM, tobeythorn wrote:
>
> > --- In iolanguage@..., Jeremy Tregunna  
> > <jeremy.tregunna@> wrote:
> >>
> >>
> >> On 4-Jun-09, at 10:31 AM, tobeythorn wrote:
> >>
> >>> I've been trying to understand how Io works and what goes on under
> >>> the hood. I'm becoming more and more impressed with it, but am a
> >>> little confused about a a few things.
> >>>
> >>> What are the statements 123 and "this is a word" and TRUE, FALSE,
> >>> and NIL? Are they messages, or objects, or messages routed to a
> >>> special built in hidden object that constructs these objects?
> >>
> >> I don't understand what you mean with "123" and "this is a word"
> >> please clarify that.
> >>
> >> However, TRUE, FALSE and NIL are just constants that point at
> >> singleton objects that are created in the runtime on startup.
> >>
> >
> > What I mean is the construction of numbers and strings.
>
> That's part of the parsing subsystem. When the lexer matches certain  
> patterns (like numbers or strings), it will create a token of that  
> particular type. When the parser gets it, it'll create an object of  
> that type with that value. They are still messages, as everything the  
> lexer processes (except comments, though that could be changed) are  
> messages.
>
> Regards,
>
> Jeremy Tregunna
> jeremy.tregunna@...
>
Jeremy,
But a message (or tree of messages) must, at the end of the day, be sent to real objects (right?). If primitive objects like numbers and strings are not the tails of trees of messages, what are? To which object would the message "Hello world" or 12345 be sent?

Thanks for your insight,
-Tobey

 « Return to Thread: Under the hood.