chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Factory pattern


From: Jong-Hyouk Yun
Subject: Re: [Chicken-users] Factory pattern
Date: Sun, 24 Jun 2007 14:13:47 +0900

Hi, Carlos.

I had some bookmarks about TinyCLOS ...

* my blog, in Korean, some tutorials : http://ageldama.egloos.com/l7
* in Japanese : http://www.namikilab.tuat.ac.jp/~sasada/prog/tclos_tutorial.html
* in Japanese : http://practical-scheme.net/wiliki/wiliki.cgi?Scheme%3ATinyCLOS

I think tinyclos does not you enforce some specific OO-style. you can define accessors by define-method and you can use simple procedure as class-function or something like that... so I think there's no private property field or something in TinyCLOS.

If you want clear OO-designs that can be accomplished by your habits and coding-style in TinyCLOS, at least my perception.

Thanks.


2007/6/24, Carlos Pita < address@hidden>:
Hi folks,
I'm new to tinyclos. I've been playing a bit with it and there is something that still annoys me. All the examples I've seen uses the initialize generic with initargs (usually in combination with the convenient initialize-slots) to initialize instances. Well, I felt that initialize-slots is there just because working with a plain list of args is not too comfortable for a constructor, so in practice initialize is more or less confined to work as a slot initializer. But then I think that this kind of constructor exposes every slot to the client, which is all against encapsulation. This can be solved easily defining different factory procedures, which encapsulate the call to make themselves. But I can't find code or advices regarding the use of this pattern with tinyclos. Is this common practice? Is there another recommended way to define proper constructors on top of make+initialize that encapsulate instance initialization?
Thank you in advance.
Cheers,
Carlos

_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users



reply via email to

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