So, last night, I was having this problem with my Java code where I couldn't
figure out for the life of me how to write a piece of code without a big if
{} else if {} else if {} ... else {} structure. I was Googling "Java
Reflection" to try to determine how to "cast to the most concerete subclass
> Although, now I'm second guessing myself, because I can't figure out how we
> could create some design pattern that simulates an applicative functor. I'm
> pretty sure the Visitor pattern doesn't take you this far (but I am willing
> to be corrected). So, is there a way to create applicative func
The concepts are fairly closely related but each entails something the other
does not. Functor entails parametric polymorphism with respect to the
contents of the container. And a visitor can extract a result from the
traversal.
As a result you may want to think in terms of a Traversable or Foldab
There was a google talk on Visitor pattern in Java and Common Lisp that you
might find interesting
http://www.youtube.com/watch?v=VeAdryYZ7ak
Daryoush
On Wed, Jun 3, 2009 at 6:10 AM, Tom.Amundsen wrote:
>
> So, last night, I was having this problem with my Java code where I
> couldn't
> figure
Tom.Amundsen wrote:
So, last night, I was having this problem with my Java code where I couldn't
figure out for the life of me how to write a piece of code without a big if
{} else if {} else if {} ... else {} structure. I was Googling "Java
Reflection" to try to determine how to "cast to the mos
On Thu, Jun 4, 2009 at 9:13 AM, wren ng thornton wrote:
> The Visitor pattern isn't a functor, it's a collection of things. The type
> being visited is the functor[1], the set of methods on that type for
> accepting a visitor is a catamorphism[2], and the visitor itself is an
> algebra for the f
Johan Tibell wrote:
wren ng thornton wrote:
> [2] For the recursive Visitor pattern I use most often, that is. For the
> non-recursive version it's usually fmap. This is the part where the pattern
> gets a bit shaky because there are actually many different patterns all
> called "Visitor". The ma
On Fri, Jun 5, 2009 at 4:45 AM, wren ng thornton wrote:
> Johan Tibell wrote:
>>
>> Could you be so kind to give an example for each?
>>
>
> In OOP you mean?
>
This cleared things up for me. Thanks!
-- Johan
___
Haskell-Cafe mailing list
Haskell-Cafe@