From: matz@... (Yukihiro Matsumoto) Date: 2003-11-21T12:58:38+09:00 Subject: Re: "stereotyping" (was: Re: Strong Typing (Re: Managing metadata about attribute types) ) Hi, In message "Re: "stereotyping" (was: Re: Strong Typing (Re: Managing metadata about attribute types) )" on 03/11/21, "Sean O'Dell" writes: |> * Types (or "interfaces" to avoid confusion) must be independent |> from class/module, otherwise they will be misused too often. Note |> that Sean himself once failed to distinguish these two. | |I agree, but since classes and interfaces are often synonymous, there could, |possibly, be an alternative mechanism to describing interfaces that used |class definition in some way. Possible. |Please ask me questions. I'm terrible about making my own new ideas known |because I don't anticipate how clearly they will be received. | |The way "false promise" was used before, a class could say "I implement this |interface" and then NOT implement it, making the statement a lie. In my new |proposal, there is no way to make that statement. If a class declares "I |implement this interface" it is marked as "incomplete" and the declaration is |essentially hidden until the last method fulfills the interface requirement. |The class makes the statement, but that is basically ignored until |fulfillment is complete, and then the class can generate objects which |contain a flag for that interface. At least I need to take time to sit down and read your article carefully first. |> * The appearance matters. I think the code example in the proposal |> does not look like Ruby: |That was just an example, I threw that in quickly. Perhaps the interface |requirements would appear in the interface definition, but they would not be |repeated when the class actually defined the method. I understand it's not your point. It's my job to design the syntax fit with other part of Ruby. All in all, I'm wondering trade-offs about this proposal. matz.