> Well I am comparing the coding styles, not particular constructs. I > was comparing typeclasses+non-recursive records and fixpoints of > recursive definitions of records. I feel Haskell provides a little bit > more syntax sugars for the former.
Indeed. On the other hand the implicit passing of instances is somewhat obscure. I simply cannot figure out how to structure the configuration mechanism if we were to use classes+instances instead of records. > > What we want to achieve is to give a number of default cases in the > codebase > > and let the user chose one of them and extend/refine it. Perhaps you can > > show both encodings side by side (including client code) so we can see > the > > pros and cons clearly. > > Yes I can see the purpose of Prototype (fixpoints of recursive > definitions of records) and I certainly want that, but I think > typeclasses+non-recursive records can serve our purpose too. I have > forked the repo on github but am not sure how much time I need to > revamp the whole core system. I guess whether there is a need to use > Prototype depends on whether these is mutual recursion between fields, > whether you want to extend it incrementally several times, and whether > the list of fields is so long that you don't want to list them in > every customization. In fact we are looking for a system that can scale, and is relatively lightweight. I believe that our prototype system succeeds on both accounts. If I remember correctly I introduced the feature in response to needs of Jeff Wheeler; maybe he could chime in. Cheers, JP. -- Yi development mailing list [email protected] http://groups.google.com/group/yi-devel
