Re: Ensuring a method exists
- From: "Javier" <javuchi@xxxxxxxxx>
- Date: 28 Sep 2006 11:10:05 -0700
Pascal Costanza ha escrito:
[...]
What you don't have in CLOS is that you can force client software to
explicitly implement methods. It's left up to the responsibility of the
programmer to define the right methods, or to leave them out when they
are actually not necessary.
I understand. Thanks.
It's important to note that static typing doesn't really help you a lot,
either. One of the pro-static-typing arguments is that it require
programmers to at least think about their design and provide empty
methods in case they are not really needed, making that design decision
an explicit one. But for example in Java, such a method can still throw
an OperationNotSupportedException, divide by zero, or do other silly
things. "Modern" development environments like Eclipse even fill in such
methods automatically for you - go figure.
Yes, I'm used to.
So to summarize, a CLOS programmer mainly uses documentation to
advertise what a client program has to do to fulfill the needs of a
framework.
Or you can use more sophisticated MOP algorithms.
I understand that this is in this way because generic functions do not
belong to classes. That's why they invented :after and :before, it is
the only way to simulate virtual functions in some way.
.
- References:
- [CLOS] Ensuring a method exists
- From: Didier Verna
- Re: [CLOS] Ensuring a method exists
- From: Lars Rune Nøstdal
- Re: [CLOS] Ensuring a method exists
- From: Didier Verna
- Re: [CLOS] Ensuring a method exists
- From: Ken Tilton
- Re: [CLOS] Ensuring a method exists
- From: Christophe Rhodes
- Re: [CLOS] Ensuring a method exists
- From: Ken Tilton
- Re: [CLOS] Ensuring a method exists
- From: Pascal Costanza
- Re: [CLOS] Ensuring a method exists
- From: Ken Tilton
- Re: [CLOS] Ensuring a method exists
- From: Pascal Costanza
- Re: Ensuring a method exists
- From: Javier
- Re: Ensuring a method exists
- From: Pascal Costanza
- Re: Ensuring a method exists
- From: Javier
- Re: Ensuring a method exists
- From: Pascal Costanza
- [CLOS] Ensuring a method exists
- Prev by Date: Re: (read-from-string "#.(values) 42")
- Next by Date: Re: Aha! moments
- Previous by thread: Re: Ensuring a method exists
- Next by thread: Re: [CLOS] Ensuring a method exists
- Index(es):
Relevant Pages
|
|