Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Eiffel > Re: "Multiple c...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 9 Topic 843 of 913
Post > Topic >>

Re: "Multiple conformance"?

by "Colin LeMahieu" <clemahieu@[EMAIL PROTECTED] > Dec 30, 2006 at 07:07 PM

After encouragement to look at the problem again, I believe I found a
much more elegant solution in the form and I'm putting it out for
anyone else stumbling over this problem:

class a [G]

create
  make

feature
  make(input: G) is
    do
      feature1(input)
      feature2(input)
    end
  feature1(source: BOUNDED) is
    do
      ...
    end

  featue2(source: INDEXABLE) is
    do
      ...
    end

feature1 and will be able to handle input by its BOUNDED interface and
feature2 will handle it by its INDEXABLE interface.  It seems to me
this solution could be used in place of generic conformance restraints
since the compiler will determine at compile time whether input
conforms to BOUNDED and INDEXABLE when determining the feature
parameter types.

I always felt the '->' operator was ugly, I may stop using it unless I
find a reason that I'm missing.




 9 Posts in Topic:
"Multiple conformance"?
"Colin LeMahieu"  2006-12-29 17:47:43 
Re: "Multiple conformance"?
"llothar" <l  2006-12-30 02:20:08 
Re: "Multiple conformance"?
Gerald Hammer <Gerald.  2006-12-31 11:40:15 
Re: "Multiple conformance"?
"Colin LeMahieu"  2006-12-30 19:07:03 
Re: "Multiple conformance"?
Gerald Hammer <Gerald.  2006-12-31 11:45:13 
Re: "Multiple conformance"?
"llothar" <l  2007-01-01 04:10:19 
Re: "Multiple conformance"?
Georg Bauhaus <bauhaus  2007-01-02 10:48:05 
Re: "Multiple conformance"?
"Colin LeMahieu"  2007-01-02 11:24:52 
Re: "Multiple conformance"?
"Emmanuel Stapf [ES]  2007-01-02 14:41:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 0:36:26 CDT 2008.