<div dir="ltr">Hi adam,<div><br>This is highly  speculative, and I´m not an expert on lens (not even a newbie), but I think that it can be applied to more than plain haskell records. In the other side The OOHaskell solution, that uses HList, is a better Object oriented system than the Object system in many OO languages. But the syntax is ugly. Maybe lens can give the syntactic sugar and some more composability.</div>

<div><br></div><div>This is the OOHaskell paper:</div><div><a href="http://arxiv.org/pdf/cs/0509027v1.pdf">http://arxiv.org/pdf/cs/0509027v1.pdf</a><br></div><div><br></div><div>More than evolving the actual code, I mean to use the ideas and solve the problems mentioned in this paper.</div>

<div><br></div><div>IMHO the Stack overflow solution that you mention above has the problems associated with type classes mentioned in this paper. It add getters and setters to type classes but it does not meet other requrements necessary for being the better OO language possible. </div>

<div><br></div><div>The OO people are not impressed when they see their favorite paradigm as a haskell sublanguage, but I´m sure that they would burn their homes and will convert to haskellism if they, in addition to getters and setters, see the right syntax for method invocation and inheritance. </div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-05 9:34 GMT+02:00 adam vogt <span dir="ltr"><<a href="mailto:vogt.adam@gmail.com" target="_blank">vogt.adam@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Alberto,<br>
<br>
The examples in <a href="http://code.haskell.org/OOHaskell/" target="_blank">http://code.haskell.org/OOHaskell/</a> need some work to<br>
compile with the current GHC and HList. The examples don't involve<br>
nesting of records, so it's not really clear that involving lens would<br>
make those examples more compelling.<br>
<br>
Regards,<br>
Adam<br>
<div class="HOEnZb"><div class="h5"><br>
On Sun, May 4, 2014 at 4:15 AM, Alberto G. Corona <<a href="mailto:agocorona@gmail.com">agocorona@gmail.com</a>> wrote:<br>
> Are there any lens implementation of OOHaskell?.  That would produce a<br>
> massive exodus from the OO comunity to haskell.<br>
><br>
><br>
> 2014-05-03 18:54 GMT+02:00 adam vogt <<a href="mailto:vogt.adam@gmail.com">vogt.adam@gmail.com</a>>:<br>
><br>
>> Hello Peter,<br>
>><br>
>> Could you show what you mean by "named labels"?<br>
>><br>
>> Vinyl is a fine choice, but have you looked at HList >= 0.3? The<br>
>> lenses/labels done with Data.HList.Labelable are prettier than the<br>
>> vinyl alternative in my biased opinion. Furthermore, they support<br>
>> changing types in the  record unlike vinyl (ie. they provide a Lens<br>
>> not Lens').<br>
>><br>
>> HList is a bit slow at compile time<br>
>> <<a href="http://code.haskell.org/~aavogt/HList-benchmark/a.html" target="_blank">http://code.haskell.org/~aavogt/HList-benchmark/a.html</a>> if you make<br>
>> records with many fields. That situation may improve soon if we take<br>
>> advantage of the ordering on Symbol that ghc-7.8 introduced. In other<br>
>> words, we will probably follow the lead of<br>
>> <<a href="http://www.haskell.org/haskellwiki/CTRex" target="_blank">http://www.haskell.org/haskellwiki/CTRex</a>> and make Records sorted by<br>
>> their labels.<br>
>><br>
>> There are quite a few other libraries<br>
>><br>
>> <<a href="http://www.haskell.org/haskellwiki/Extensible_record#Libraries_on_hackage" target="_blank">http://www.haskell.org/haskellwiki/Extensible_record#Libraries_on_hackage</a>>.<br>
>> Also consider lens' makeClassy as another solution to the records<br>
>> problem.<br>
>><br>
>> Regards,<br>
>> Adam<br>
>><br>
>> On Sat, May 3, 2014 at 6:16 AM, Peter Althainz <<a href="mailto:althainz@gmail.com">althainz@gmail.com</a>> wrote:<br>
>> > Dear All,<br>
>> ><br>
>> > I'm searching a handsome library for handling large amounts of<br>
>> > configuration<br>
>> > data in a flexible manner. So to speak I want to use some kind of<br>
>> > inheritance of data fields. I think this is where the extensible records<br>
>> > discussion is a proper description of my use case.<br>
>> ><br>
>> > I've found 2 libraries making this work, so far:<br>
>> ><br>
>> > HList<br>
>> > Vinyl<br>
>> ><br>
>> > I currently prefer Vinyl due to the complex types in HList, lens<br>
>> > compatibiliy, named labels. (I love the HList and OOHaskel papers, but<br>
>> > for<br>
>> > practical use, I currently prefer Vinyl).<br>
>> ><br>
>> > What do you think, what is the best way nowadays to use extensible<br>
>> > records?<br>
>> > Is Vinyl a good choice from your point of view?<br>
>> ><br>
>> > regards<br>
>> > Peter<br>
>> ><br>
>> > _______________________________________________<br>
>> > Haskell-Cafe mailing list<br>
>> > <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
>> > <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
>> ><br>
>> _______________________________________________<br>
>> Haskell-Cafe mailing list<br>
>> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
>> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Alberto.<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Alberto.
</div>