2014-09-05 22:44 GMT+02:00 Marko Rauhamaa <ma...@pacujo.net>: > Panicz Maciej Godek <godek.mac...@gmail.com>: > >> I think that it is a big problem of Scheme, that it does not have any >> noncontroversial and commonly accepted way for creating named tuples. > > That's what alists are. They may not be the most beautiful way to > represent data as S expressions but they sure are noncontroversial and > commonly accepted.
I think that (putting side other issues) if one person in this thread claims that srfi-9 is a commonly accepted representation, and another claims that alists are a a commonly accepted representation, then it's a proof that none is commonly accepted. > However, objects, in my opinion, are the antithesis of tuples. Objects > are the focal points of methods. Whether the black box contains data and > in what form is none of the rest of the world's concern. Apparently our views on the essence of OOP differ. I perceive an object as an aggregation of properties, and a set of methods I would call an interface. Perhaps to you doing OOP is about defining interfaces, and to me it's more about aggregating properties. I wouldn't say that anyone of us is more right than the other. > IMO, GOOPS has two main flaws: > > * It brings an object's data slots to the fore while brushing methods > aside. The object constructor syntax is more or less directly tied to > the data slots. I agree that the constructor syntax isn't expressible to handle some very common use cases, and requires to overload the "initialize" method in many trivial situations. But my solution to this problem is to construct OOP framework atop of GOOPS. It might not be the simplest solution, but I find it promising > * It introduces a very strong, almost Linnaean, type system to Scheme, > where it seems out of place. I see no principal reason for such > classification. I don't declare my numbers in Scheme; why should I > declare my object types? I don't think I understand. There is no strong type system, and there's no need to declare object types. The types are mainly for convinience -- to allow you to implement the same interfaces for different objects.