SEAL Forum Index SEAL
The SEAL Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

C vs CPP
Goto page Previous  1, 2
 
Post new topic   Reply to topic    SEAL Forum Index -> Seal 3.0 Development
View previous topic :: View next topic  
Author Message
vbAlex



Joined: 22 Oct 2003
Posts: 3
Location: Michigan

PostPosted: Thu Feb 05, 2004 10:38 pm    Post subject: Re: 2 Cents Worth Reply with quote

Ignore my other post. It was from before I learned Assembly...

I'm going with Michaelo on this one... We should use C, and maybe some inline Assembly. Structs are our classes and Assembly is our pixel-manipulation/looping/line drawing/math language. So half C and half ASM . And as long as structs are used instead of other C-specific types, language interfacing will be a breeze.
_________________
+--------------------------------------+
Email: vbAlexDOSMan@Yahoo.com
Website: http://www.vbAlex.com/ (Not up yet)

Chat:
> AIM: vbAlexDOSMan
> ICQ: 271781078
> Jabber: IReadYourEmail@Jabber.org/Gaim
> MSN: vbAlexDOSMan@Hotmail.com
> Yahoo: vbAlexDOSMan@Yahoo.com

Projects:
> EEL: http://www.sourceforge.net/projects/eel
> Forum Plus: http://www.sourceforge.net/projects/forumplus

Code is free speech, so free it up!
+---------------------------------------+
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Sean



Joined: 04 Apr 2002
Posts: 20
Location: United States

PostPosted: Thu Apr 29, 2004 4:59 pm    Post subject: Reply with quote

w_w_n_uk wrote:
How says C cant have a nice OOP look at the basic OOP i made

int main()
{
lz_obj.file1 = "file1";
lz_obj.file2 = "file2";
lz_obj.encode();
return 0;
}

what do you all think and is in C no C++ used
btw lz_obj.encode(); if a function


except how would your encode function access lz_obj.fille1 or lz_obj.file2 without passing lz_obj to encode()? I don't recall C having a 'this' object. And has anyone heard of BeOS? Almost the entire user API is C++, but the kernel is C/Assembly. And it's VERY fast.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
BadSector
Administrator


Joined: 24 Oct 2001
Posts: 328
Location: Greece, Samos

PostPosted: Sat May 01, 2004 8:47 am    Post subject: Reply with quote

The major problem for using C instead of C++ (speed issues, etc are b******* - the critical parts will be written in assembly anyway) is that there isn't any standard way for namemangling in C++ object files. Every C++ compiler uses it's own way. We could stick to GCC (which is NOT a good idea), but GCC changed it's namemangling scheme before and it's possible to do it again in the future.

Name mangling is a big issue for the dynamic linker.

Another problem is that many people feel uncomfortable with C++. I don't want to put these people away.

Now keep in mind that XSeal is written in C and stop this C vs. C++ issue.
If you want C++, you can always write a wrapper, but this wrapper will be linked with the application/library thus making it larger.
_________________
main(){printf("Hello, world!n"); return 0;}
Bad Sector - http://www.bsector.cjb.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    SEAL Forum Index -> Seal 3.0 Development All times are GMT - 7 Hours
Goto page Previous  1, 2
Page 2 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