Posted: Mon Mar 26, 2012 8:45 pm
Joined: 28 Jan 2012
Posts: 7
Hello.
Is C++ code accepted in blender? I noticed that there isn't much of it other than in the somewhat disjoint game engine.
Is there any reason to not gradually move from C to C++ for some OOP features other than unfamiliarity with C++?
Thanks,
Colin
Posted: Wed Mar 28, 2012 8:15 am
Joined: 07 Nov 2010
Posts: 543
Well, there is the fact that it is such a needlessly complicated and cumbersome language.
But then, that’s just my opinion from having written about 100,000 lines of it over several years.
Posted: Wed Mar 28, 2012 5:41 pm
Joined: 05 Aug 2003
Posts: 3489
| Quote: |
| Is there any reason to not gradually move from C to C++ for some OOP features other than unfamiliarity with C++? |
Yes. Re-writing code in another language is pointless and silly.
Posted: Fri Mar 30, 2012 3:12 pm
Joined: 28 Jan 2012
Posts: 7
| stiv wrote: |
| Quote: | | Is there any reason to not gradually move from C to C++ for some OOP features other than unfamiliarity with C++? |
Yes. Re-writing code in another language is pointless and silly. |
I'm not asking to rewrite blender in C++, I'm asking if C++ modules are accepted, and at what level? You mention rewriting code in another language being silly, but I specifically found a case (using Google) where a C++ addition to blender kernel was rewritten in C
I'm trying to avoid having to rewrite any feature additions I make to Blender because of an OOP design I chose that is incompatible with standard C
Posted: Sat Apr 07, 2012 12:11 am
Joined: 24 Aug 2010
Posts: 34
Good question, I've often wondered why there's so much pure C in the Blender codebase.
Posted: Wed Apr 25, 2012 1:33 am
Joined: 24 Apr 2012
Posts: 1
Blender was released in 1995 and was written prior to that. The official C++ standard was in 1998. There were plenty of C++ programmers, but it is to no surprise that Blender was primarily written in C. And unlike other people say, I would advise that instead of picking favorites in the programming languages, just learn as many as you can, because they all serve some purpose(s) better than others.