lua-users home
lua-l archive

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


Hi Hakki Dogusan,

I found your posting simple and looked possible for me.
So I implemented GoF's strategy pattern with it.

https://github.com/Journeyer/hfdpcpp_s/tree/master/docs/_static/Silver/Strategy/LContent

But my implementation uses multiple instances of a module. And I had to use __newindex.

I think this implementation is NOT good for lua. It is just direct translation from C++ to lua.
I want to start from here!

Thank you for good posting.

Sincerely
Journeyer

----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l  d o t  c o m
----------------------------------------


2014-02-26 18:49 GMT+09:00 Hakki Dogusan <hakki@dogusan.net>:
Hi,

26-02-2014 09:29 tarihinde, Journeyer J. Joh yazdı:

Hi Steve Donovan and people interested in this talk,

I implemented Strategy Pattern using of YACI[1]

https://github.com/Journeyer/yaci.lua/tree/hfdplua/hfdplua

I forked original YACI from github and created a branch - hfdplua.

In this branch, I will implement GoF's patterns and I will make a test suit
for YACI using of these patterns implementations.

After I finished making a test suite I will submit the pull request to the
host of YACI.

You said virtual function is not supported by lua. But YACI supports it
though it would be too much complicated and never simple.

Without virtual function feature, I believe almost no GoF patterns could be
implemented.


I've done some work for Template Pattern, maybe it gives you some idea..

http://lua-users.org/wiki/TemplatePattern


[snip]

Sincerely
Journeyer


[snip]


Regards,
Hakki Dogusan