Forums
Visitor pattern in Cobra
3 posts
• Page 1 of 1
Visitor pattern in Cobra
Actually this class would work fine with any CLR language including C# and VB. It's likely that Visitor will get into the Cobra standard library, enabling you to quickly pound out a visitor pattern in any Cobra program. Feedback welcome.
- Attachments
-
- visitor.cobra
- The Visitor Pattern in Cobra, version 1
- (5.39 KiB) Downloaded 566 times
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Visitor pattern in Cobra
Ack, I uploaded the wrong file. This new one is much the same, but the docs are slightly improved.
- Attachments
-
- visitor-lang.cobra
- The Visitor Pattern in Cobra, version 2
- (6.41 KiB) Downloaded 595 times
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Visitor pattern in Cobra
Btw this made it into the Cobra standard library, so the "Visitor" class is now available by default. It's a rather small, but useful class. Inside CobraLang.cobra, you'll find a doc string explaining how it works.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 18 guests