User Name:


Forgot your password?
Vote for Us!
 alias snippet fix
Yesterday, 6:14 pm
By Vladaar
 help with debug?
Yesterday, 5:52 pm
By joeyfogas
features of a good MUD
Yesterday, 1:06 am
By GatewaySysop
All skills to a class?
Mar 15, 2018, 11:43 pm
By joeyfogas
help with syntax for mobprog (smaug)
Mar 14, 2018, 10:34 pm
By joeyfogas
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Bing

Members: 0
Guests: 9
Newest Member
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » C++ Conversion
Forum Rules | Mark all | Recent Posts

C++ Conversion
< Newer Topic :: Older Topic > C++ benifits?

Pages:<< prev 1 next >>
Post is unread #1 Mar 11, 2005, 4:44 am
Go to the top of the page
Go to the bottom of the page

JoinedOct 9, 2006

What exactly prompted the decison to convert the codebase to C++? Are there any particular benifits in doing this, or was it just to allow compiling under newer versions of GCC? I think the latest was 3.4.3 or something.
Post is unread #2 Mar 11, 2005, 3:22 pm
Go to the top of the page
Go to the bottom of the page


GroupAFKMud Team
JoinedJan 1, 2002

Hmm... the benefits of OO programming? Yikes... that's a tough one ;p I think a conversion like this was a long time coming since the ability to use classes and advanced programming techniques just can't be realized in a c environment.

It's amazing to me, actually, that there haven't been more C++ codebases since it's obviously been available for quite a while. I think the biggest problem is finding someone who can untangle the convoluted mess that was SMAUG and make it into anything remotely readable, much less convertible ;)

Once things are moved to C++ you can start to realize the benefits of inheritance and even small things (to some) such as actual string handling ;p

Not doing the converting, I can't speak for all of the reasons but only for what small amount I know of the differences between the languages.
Post is unread #3 Mar 12, 2005, 8:54 pm
Go to the top of the page
Go to the bottom of the page

Black Hand
JoinedJan 1, 2002

Well in all honesty I'm not sure anymore why we're doing it. But I will say that having the ability to use C++ strings will be well worth it even if that's the only tangible benefit people see. Strings which don't overflow their buffers and functions to manipulate them that make a hell of alot more sense than trying to walk arrays of characters.

STL lists are far safer to use than the LINK/UNLINK macros too, so that will be of great benefit to people. std::bitset allows for what appear to be limitless bitvectors, vs the 128bit cap on the EXT_BV hack structure, that conversion has been done on all bitvector sets. File stream IO seems to be far less picky about the way you handle them, so that will be helpful too. There are some instances where std::map comes into play and makes the data that uses them much easier to fiddle with.

In the end, it's not trying to become a convoluted mass of inhereted classes and structs, with templates out the wazoo, but merely something that leverages what works to make life easier.
Pages:<< prev 1 next >>