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

String class?
Goto page 1, 2  Next
 
Post new topic   Reply to topic     Forum Index -> Ares
View previous topic :: View next topic  
Author Message
kris



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

PostPosted: Wed Nov 24, 2004 6:40 pm    Post subject: String class? Reply with quote

As suggested by Sean, here's a forum to discuss what would make a good String class. It seems there are a number of viewpoints upon this particular animal, so here's a few that we might discuss:

a) Fark String! We don'need no steenking classes!

b) Should there be multiple String classes for each of char/wchar/dchar?

c) A string Interface seems like a reasonable idea. What might it look like?

A second, related notion, is how to ensure certain common classes (String in particular) can be made compatible with one another. Right now there are two or three different implementations (Dool, Mango, and one other from an old NG post: one which I can't find anymore).
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Thu Nov 25, 2004 12:47 am    Post subject: Reply with quote

Quote:
what would make a good String class

we're not going to start all over, are we? We'll never get anywhere.
I thought of extracting the interface from mine, extract from yours and
reduce to the minimum common thing. Then we would go from there.
Quote:
We don'need no steenking classes

this wouldn't affect those people. I expect 0 support from DM. Let's just
do our thing to avoid the libs to grow further appart.
Quote:
Should there be multiple String classes for each of char/wchar/dchar?

I don't think this is an interesting problem. I don't have intentions of learning about it. I thought a template would take care of most of the differences but seems (I don't know) processing is difference for each type.
Quote:
A string Interface seems like a reasonable idea. What might it look like?

extracting the interface from mine, extract from yours and
reduce to the minimum common thing (did I say that before?)

what are we doing?
Let's forget the implementation and create a set of simple common interfaces.

You prefix your interfaces with "I", that list all the interfaces together.
I postfix mines with IF, that lists the interfaces together with the implementing classes:
StringIF
String
StringW
StringD

what's the best way? Alphabetical order is still used for search.

How are we going to distribute and include our interface set?
Should it be based on a elaborate organized tree or as flat as possible?

Ant
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Thu Nov 25, 2004 2:10 am    Post subject: Reply with quote

I don't really have anything against string classes, but then I don't really see the need for it either (that is a personal opinion, I might slump into needing it anyway).

The pros of a string class in D:

- Encapsulation of similar functionality, that is, string functions.
- The possibility to hide the three types. One class for each string types sounds altogether wrong.

- Oh, and for those OO-afficinados out there it might be nice. I believe that the need to keep to one regime is a leftover from people that have done to much of either Java or C programming.

I wouldn't mind to have a (one, not three) really good string class in Ares, though.
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Thu Nov 25, 2004 7:41 am    Post subject: Reply with quote

larsivi wrote:
The pros of a string class in D:


Kris,

I don't think we are in the right place.
I don't want to discuss the pros and cons of a String class.

All I want to do is to have a common base String interface for who ever want's a String class. And then expand to all common classes.

Seems to me the Ares project is a library at the same level as Dool and Mango. This common base project should be above Dool, Mango and Ares.

I cannot discuss the pros and cons of OO against pure procedural because I don't think pure procedural is a valid development model. I grant you: it's my limitation. But let all know that I worked on procedureal languages for 8 years - so it's not by lack of experience.
Futher more, life being so short we have some focus and I'm not focusing on discussing OO vs procedural.

All this makes me conclude that my posts will not be welcome on the Ares discussion. Can we move somewhere else?

Ant
Back to top
View user's profile Send private message
kris



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

PostPosted: Thu Nov 25, 2004 12:42 pm    Post subject: Reply with quote

Ant wrote:
Can we move somewhere else?

Certainly: you have email ...
Back to top
View user's profile Send private message
sean



Joined: 24 Jun 2004
Posts: 609
Location: Bay Area, CA

PostPosted: Thu Nov 25, 2004 12:43 pm    Post subject: Reply with quote

Ares was meant to be a replacement for Phobos, or at least a replacement of the standard library portion of Phobos, so it would be a good place for a String class if folks wanted one.

Personally, I don't see a need for a String class. I would rather have standalone utility functions than bundle them in a class. But I think an argument could be made for a String class in terms of interface consistency. Could someone explain why having a string class would be so useful? I don't want to oppose the idea outright just because I haven't considered all the angles.
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Thu Nov 25, 2004 1:04 pm    Post subject: Reply with quote

Ant wrote:


All this makes me conclude that my posts will not be welcome on the Ares discussion. Can we move somewhere else?



You gathered that from my post?! You sure got it wrong, then. Anyones posts are very welcome here (here's far to few of them, and I'm probably one of them that's to blame for that) and since Ares is about creating a possible replacement for Phobos, a discussion about the inclusion of a string class is highgly relevant. Whether it should be discussed now or not is a different matter.

I wouldn't mind considering a finished string class/interface for inclusion later if you find a 'closed' process/discussion more effective, though.
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Thu Nov 25, 2004 1:12 pm    Post subject: Reply with quote

Heh, putting the little one to bed took time.. I wasn't aware that a couple of other posts slipped in between Smile You kinda stole my thoughts, sean Wink
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Thu Nov 25, 2004 1:44 pm    Post subject: Reply with quote

larsivi wrote:
Ant wrote:

All this makes me conclude that my posts will not be welcome on the Ares discussion. Can we move somewhere else?

You gathered that from my post?! You sure got it wrong, then.


No, not from your post alone.
But I didn't change my mind. And what I meant by not welcome is more like "not on topic".

My idea is to have something above dool, Mango, Ares and what ever other libraries may be created.

maybe comparing it to what POSIX is to OSs makes sence,
(POSIX. The Portable Operating System Interface)
my idea is to create a "Portable D library Interface". PODLIX (whatever).

This will be usefull because we will have multiple libraries. We will have multiple libraries because we can't work together - that was demonstrated during the last 1 1/5 on the D news groups.

If PODLIX becames a reality all libs will integrate seamingless enabeling one application to use every library it needs without juggling data conversion between libs.

It's a simple idea. And it's different from Ares objectives.
Ares could be a member of PODIX, that makes sense to me.

Ant

PODLIX ?
Portable D Library Interface
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Thu Nov 25, 2004 1:47 pm    Post subject: Reply with quote

But both Ares (and Phobos) is meant to have a common interface across all platforms (at least that's my vision).
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Thu Nov 25, 2004 1:55 pm    Post subject: Reply with quote

larsivi wrote:
But both Ares (and Phobos) is meant to have a common interface across all platforms (at least that's my vision).


ok, but I don't like and I don't want to use the phobos interface.
I guess that puts Ares outside my new idea...

I can also see that mango duplicates functionalities from phobos and
from dool - phobos is out but maybe mango and dool follow a pararell road.

Ant
Back to top
View user's profile Send private message
sean



Joined: 24 Jun 2004
Posts: 609
Location: Bay Area, CA

PostPosted: Thu Nov 25, 2004 1:56 pm    Post subject: Reply with quote

Er, Ares or Phobos would be the standard library for D and therefore would be at a lower level than POSIX libraries or anything else (assiming you mean POSIX support written in D and not into the OS itself). But if you'd rather do it in another venue that's fine with me.
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Thu Nov 25, 2004 1:59 pm    Post subject: Reply with quote

sean wrote:
POSIX


opps. POSIX was just a comparison. maybe I was not clear. I'm not doing anything with posix!

Ant
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Thu Nov 25, 2004 2:05 pm    Post subject: Reply with quote

I suppose we're off topic now, but what the heck;

Ares is NOT Phobos (that was the whole point of it), but we wanted to take the stuff that's good from Phobos if possible. I think it might be relevant to have a discussion (another?) over whether Ares should provide both procedural and OO-support wherever both is possible. This would probably mean an OO-wrapper over the procedural functions, making that solution somewhat less 'perfect'. It would be the easier way considering mantainence, at least.
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Thu Nov 25, 2004 2:17 pm    Post subject: Reply with quote

larsivi wrote:
Ares is NOT Phobos, but we wanted to take the stuff that's good from Phobos if possible.

that already exists and it's called dool:
http://sourceforge.net/forum/forum.php?thread_id=1121037&forum_id=394961

larsivi wrote:
I think it might be relevant to have a discussion (another?) over whether Ares should provide both procedural and OO-support wherever both is possible.

That is very important! but... for Ares, not for me. I already decided.

So, you see? I don't think we have to same problems and objectives...
no harm there! :)

Ant
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Ares All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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