Re: about syntax error

2005-05-07 Thread Mat Hostetter
Like C++, isn't the instance of bbb temporaly created at
constructor of aaa, then destroyed after the construction?

No.  Curl is a garbage-collected language, like Java and C#.  Objects
are only freed when there are no more pointers to them anywhere.

Garbage collection loops through all the objects that have been
allocated, finds the ones that are not reachable any more, and frees
them automatically.

You do not need to call garbage-collect yourself; the system will
automatically call it for you when it needs more memory.

In Curl, you just allocate objects and let the system worry about
reclaiming the memory you are not using any more.  This is much more
convenient than C, where you have to manage memory yourself, or C++
where you have to worry about reference counting, copy constructors,
etc.

-Mat


***
To unsubscribe from this list, send a mail to:
mailto:[EMAIL PROTECTED]
To contact a human list administrator, send a mail to:
mailto:[EMAIL PROTECTED]
To recieve a list of other options for this list, send a mail to:
mailto:[EMAIL PROTECTED]



Re: about syntax error

2005-05-02 Thread Mat Hostetter
  {constructor public {default b:bbb}
set fnc = {proc {}:bool {return {bbb.def}}}
  }

Also, unlike C++, when you access fields on 'self' you must say so
explicitly.  So you probably want this:

  {constructor public {default b:bbb}
set self.fnc = {proc {}:bool {return {bbb.def}}}
  }

-Mat

***
To unsubscribe from this list, send a mail to:
mailto:[EMAIL PROTECTED]
To contact a human list administrator, send a mail to:
mailto:[EMAIL PROTECTED]
To recieve a list of other options for this list, send a mail to:
mailto:[EMAIL PROTECTED]