Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > protected members or explicit abstract classes?

Reply
Thread Tools

protected members or explicit abstract classes?

 
 
ara.t.howard
Guest
Posts: n/a
 
      07-21-2008

On Jul 21, 2008, at 3:39 AM, aidy wrote:

> Hi,
>
> I am reading a book on Java OO.
>
> Could anyone tell me why Ruby does not include protected members nor
> explicit abstract classes?
>
> Thank You
>
> Aidy



as rubyists, we never protect our members.

a @ http://codeforpeople.com/
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama




 
Reply With Quote
 
 
 
 
Robert Dober
Guest
Posts: n/a
 
      07-22-2008
>
> On Tue, 22 Jul 2008, Dean Wampler wrote:
>


>>
>> I prefer the ruby way;

>
> That's a bit of a conversation-stopper


Oh no problem, I'll teach him Ruby .
>
>> let my automated tests confirm that the required methods are present
>> when I include a module in another module, where the included module
>> expects the including module to respond to a set of methods. Also,
>> the tests document the behavior for the users!


That's exactly what I do in my *applications.
However, I really try to be defensive when developing libraries or frameworks.
David put it quite nicely, there are cases where I offer a service to
a user. If it fails with a method missing deep inside the call stack
the user just has to debug my framework or library to understand what
happened (well of course it should be in the docs LOL).
The least I want to tell him is:
Pally, look this thingy of yours you passed into foo does not look
like a bar, sure U know what UR doing?
Now of course she knows exactly what to do .

Again in general I agree, I will not check for protocols or methods in
my standard application, that is what tests (or microtests ) are for.


Cheers
Robert

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
comparison of protected members vs abstract classes Sideswipe Java 6 09-20-2007 09:55 PM
Explicit instantiation of STL vector demands explicit instantiation of all the templates it using internally. krunalbauskar@gmail.com C++ 1 12-25-2006 03:51 PM
Protected static members, abstract classes, object composition vs. subclassing Kevin Prichard Javascript 11 11-29-2005 01:33 AM
What's the difference betwwen explicit instantiaion and explicit specialization? Andy C++ 5 01-30-2005 11:46 PM
Is explicit template qualification required for explicit delete? J.T. Conklin C++ 1 08-11-2004 02:06 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57