guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A couple of questions about goops method parameters


From: Panicz Maciej Godek
Subject: Re: A couple of questions about goops method parameters
Date: Sat, 6 Sep 2014 10:53:58 +0200

2014-09-06 0:14 GMT+02:00 Marko Rauhamaa <address@hidden>:

>>>  * [GOOPS] 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.
>
> The types are a great inconvenience, syntactically and conceptually.
> Syntactically, your GOOPS method de, it plainly extends the means of 
> expression (and I think there's no problem in providing one's own syntax with 
> a macro)finitions make your Scheme code look
> like Pascal with the class names sprinkled among the parameters.
> Conceptually, the classes force me to put objects into buckets that
> don't correspond to my thought processes. Even Java offers anonymous
> classes for the purpose.

Now I don't understand what you're saying to even bigger extent.
GOOPS does not offer a type system, but a multiple method dispatch
system. It doesn't take away any freedom of using GOOPS objects with
regular Scheme functions, but allows to use one interface for
different implementations. Whether one likes the syntax or not, it
plainly extends the means of expression (and I think there's no
problem in providing one's own syntax with a macro)

However, I'd rather say that the lack of any type system in Guile is
an inconvinience, because static type checking allows to avoid a huge
class of software errors, and a good type system (like the one in
Haskell) actually enhances language's expressiveness. It's an issue
that's been talked over so many times, that it's already present in
comic strips:
http://ro-che.info/ccc/17



reply via email to

[Prev in Thread] Current Thread [Next in Thread]