Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Different types of programming languages? (A few questions in here )

Author
Message
Paradox452
14
Years of Service
User Offline
Joined: 29th Jul 2011
Location:
Posted: 9th Aug 2011 04:37
I am not sure if this is accurate, but from what I've learned from random forums all over the internet; "Some programming languages are object-orientated and others are not." As far as I know, DarkBasicPro is NOT an object oriented language. Is this correct? And what does it mean if the language is object orientated or not? Any pros or cons of this?

Also, why is C++ so hard to learn
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 9th Aug 2011 06:45
Quote: "As far as I know, DarkBasicPro is NOT an object oriented language. Is this correct?"


It is a procedural language, like C. This is the best explanation I could find.

I found that most of my C++/Object-oriented programming questions were answered at the creator of C++'s (Bjarne Stroustrop) FAQ on his site:http://www2.research.att.com/~bs/bs_faq.html

Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 9th Aug 2011 11:15
Personally I think it's best to code in your own style, whatever the language. My current project is in DBPro and C++, and the actual game logic is practically the same. C++ can be as procedural as you like, DBPro can be as object orientated as you like.

When it comes to game programming, you really are better off just getting stuck in, because experience is the most important thing. Game programming experience is transferrable, because it's more about technique than syntax. If you code a particle engine for example, in DBPro, then the next time you code one it'll be leaner and better, and if you then go onto making a C++ particle engine, then you'd find yourself using the same techniques. I find that the biggest difference is in rendering engines, well any 'engine' component - you have to do more legwork with C++, but that also affords you more control over things.

If you want to make games and have never done so, pick up DBPro and learn that, it covers everything you need to know, and if you start to outgrow it, theres always DGDK and other C++ engines out there.

Health, Ammo, and bacon and eggs!
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 9th Aug 2011 14:29
Dbpro allows orientation by using types similar to c language. type in such languages with creating some functions in a specific file would be concidered as class similar to c++ etc...
Paradox452
14
Years of Service
User Offline
Joined: 29th Jul 2011
Location:
Posted: 9th Aug 2011 19:26
Quote: "I found that most of my C++/Object-oriented programming questions were answered at the creator of C++'s (Bjarne Stroustrop) FAQ on his site:http://www2.research.att.com/~bs/bs_faq.html"


Thanks for the link, there is so much info on this page!

The wisest leader is the one that can avoid the conflict in the first place.
tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 9th Aug 2011 22:02
Quote: " DBPro can be as object orientated as you like."

DBPro can be made modular (programmer enforced) but it is nothing close to object oriented.


A 3D marble platformer using Newton physics.
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 9th Aug 2011 23:22
I don't know how to answer "why is C++ so hard to learn", but I can say that it really helps to learn an Object Oriented language before moving on to C++. I couldn't really wrap my head around C++ until I started learning Java in school. So... Even though C++ is the language I prefer, you might want to start learning Java. Then you can go straight to the hallmarks of Object Oriented Programming - member variables, access modifiers, friend classes, polymorphism and inheritance, to name a few - without having to learn all about pointers and memory safety and destructors.

So, you might want to learn Java. It's a good language for OOP.

I've also heard great things about C#, and that "it fixes many problems with java", but I don't know how true that is.


Why does blue text appear every time you are near?
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 10th Aug 2011 00:38 Edited at: 10th Aug 2011 00:39
Object oriented programming is as much a design choice as a language feature. In my box2d plugin for example, you will see code like this:

world = b2CreateWorld( <params> )
b2SetWorldGravity world, <params>

In effect, you are using the value in "world" as an object. You can set and get properties of it, and there is even a form of inheritance: b2GetObjectType works on all IDs, b2TestShapePoint works on all shape IDs and b2GetCircleShapeRadius works only on circle shape IDs.

You can get even closer to object oriented programming in DBPro if you use a precompiler (Unfortunately the download links are broken, I'll have to fix that...).

[b]

Login to post a reply

Server time is: 2026-07-10 20:58:35
Your offset time is: 2026-07-10 20:58:35