FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Abstract Attributes

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT
View previous topic :: View next topic  
Author Message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Apr 18, 2004 7:57 pm    Post subject: Abstract Attributes Reply with quote

Java uses the abstract attribute to modify a class name to make abstract classes. D apparently doesn't do it this way. I tried to look up the abstract attribute use in the D reference manual, but it doesn't describe it Sad.

I know Kris uses abstract in dsc.AbstractServer to create an abstract class. It appears that an abstract class in created in D when the individual class methods are attributed with "abstract." Is there any documentation on this to explain it's use better?

Thanks,

John
Back to top
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Sun Apr 18, 2004 8:37 pm    Post subject: Reply with quote

D:8581
Patrick Down wrote:
The page in the D docs

http://www.digitalmars.com/d/attribute.html

lists abstract and final but does not document them.

I assume they are to have similar meaning to Java's
abstract and final.

D:8646 (Date: Fri, 27 Sep 2002 13:22:03 -0700)
Walter wrote:
I need to work on that...

Anybody good at biology? If we cloned Walter, the pair of them might be able to keep up with all of this stuff better. About 1.5 years later, they still aren't described in the docs. Confused
Back to top
View user's profile Send private message AIM Address
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sun Apr 18, 2004 9:20 pm    Post subject: Reply with quote

in D, an abstract class is implied if any of the methods are abstract.

Decorating the class itself with the abstract keyword (currently) has zero effect. It's probably best to avoid depending on that, and remove the abstract keyword from any Java class.

- Kris
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Apr 18, 2004 10:02 pm    Post subject: Reply with quote

kris wrote:
in D, an abstract class is implied if any of the methods are abstract.

Decorating the class itself with the abstract keyword (currently) has zero effect. It's probably best to avoid depending on that, and remove the abstract keyword from any Java class.

- Kris


Thanks Kris, That's what I figured was the case from your examples. I vaguely remembered something about the abstract keyword having zero effect when decorating the class itself.

How did you come across this information? Trial and error?
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sun Apr 18, 2004 11:28 pm    Post subject: Reply with quote

I think Walter noted something like that in a reply to my ranting about Partial Interface Implementation ...
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group