Re: [Bf-committers] Status of C++

2010-11-25 Thread Leo Sutic
All,

thanks for the advice. I have no problem following those recommendations.

/LS

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Status of C++

2010-11-19 Thread raulf
I could not give you a precise answer but many Blender modules are
completely written in C++, elbeem fluid simulator is one of them and
besides C and C++ have bridges that makes hybrid code possible.

I do agree with you that some tasks are easier to do in a completely
Object Oriented environment rather than a structured paradigm, readability
will be increased a lot among other benefits, perhaps in the future
Blender could be rewritten under a C++ base only but I don't see that
happen anytime soon, and C is not so bad after all ;)

   Cheers   Farsthary

 I've looked in a lot of places and Googled, but haven't found any
 answer: What is the status of C++ in Blender? Should I just take a hint
 from the fact that it is almost all written in C, or is that an artifact
 of it being 15 years old?

 I know that it isn't the easiest language out there, but std::vector is
 kinda nice, and basic single inheritance, too. I have no problem with C,
 but that syntactic sugar of C++ is sweet in small doses.

 /LS
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Status of C++

2010-11-17 Thread Ton Roosendaal
Hi,

The convention is that all modules in Blender have a C API, but within  
a module a developer can choose whether to use C or C++. It's not very  
practical to mix C and C++ within sections, which is a reason why most  
of source/blender/ code still is C. A lot of libararies outside this  
directory are C++.

-Ton-


Ton Roosendaal  Blender Foundation   t...@blender.orgwww.blender.org
Blender Institute   Entrepotdok 57A  1018AD Amsterdam   The Netherlands

On 15 Nov, 2010, at 21:49, Leo Sutic wrote:

 I've looked in a lot of places and Googled, but haven't found any
 answer: What is the status of C++ in Blender? Should I just take a  
 hint
 from the fact that it is almost all written in C, or is that an  
 artifact
 of it being 15 years old?

 I know that it isn't the easiest language out there, but std::vector  
 is
 kinda nice, and basic single inheritance, too. I have no problem  
 with C,
 but that syntactic sugar of C++ is sweet in small doses.

 /LS
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Status of C++

2010-11-15 Thread Leo Sutic
I've looked in a lot of places and Googled, but haven't found any
answer: What is the status of C++ in Blender? Should I just take a hint
from the fact that it is almost all written in C, or is that an artifact
of it being 15 years old?

I know that it isn't the easiest language out there, but std::vector is
kinda nice, and basic single inheritance, too. I have no problem with C,
but that syntactic sugar of C++ is sweet in small doses.

/LS
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Status of C++

2010-11-15 Thread Wolfgang Draxinger
Am Mon, 15 Nov 2010 21:49:20 +0100
schrieb Leo Sutic leo.su...@gmail.com:

 I know that it isn't the easiest language out there, but std::vector
 is kinda nice, and basic single inheritance, too. I have no problem
 with C, but that syntactic sugar of C++ is sweet in small doses.

Please for all gods sake, please don't try to push C++ into Blender.
It's a horrible language. This so called syntactic sugar creates more
problems than it solves.

C is an extremly versatile and powerfull language. And if you know how
to use it allows for much more OOP than ever possible in C++.

You may want to polish up your C++ knowledge:
http://yosefk.com/c++fqa/


Wolfgang
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Status of C++

2010-11-15 Thread Leo Sutic
I wasn't really asking for an opinion of C++, I was asking what the
community had decided, if anything, in regards to use of the language.

C++ is already in Blender (GHOST, Audaspace, etc.), so it's not like I
have to try to push it in: It's already there. But I need to know just
what the deal with it is.

/LS

On 2010-11-15 21:57, Wolfgang Draxinger wrote:
 Am Mon, 15 Nov 2010 21:49:20 +0100
 schrieb Leo Sutic leo.su...@gmail.com:
 
 I know that it isn't the easiest language out there, but std::vector
 is kinda nice, and basic single inheritance, too. I have no problem
 with C, but that syntactic sugar of C++ is sweet in small doses.
 
 Please for all gods sake, please don't try to push C++ into Blender.
 It's a horrible language. This so called syntactic sugar creates more
 problems than it solves.
 
 C is an extremly versatile and powerfull language. And if you know how
 to use it allows for much more OOP than ever possible in C++.
 
 You may want to polish up your C++ knowledge:
 http://yosefk.com/c++fqa/
 
 
 Wolfgang
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers
 

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Status of C++

2010-11-15 Thread Diego B
On Mon, Nov 15, 2010 at 6:11 PM, Leo Sutic leo.su...@gmail.com wrote:
 I wasn't really asking for an opinion of C++, I was asking what the
 community had decided, if anything, in regards to use of the language.

 C++ is already in Blender (GHOST, Audaspace, etc.), so it's not like I
 have to try to push it in: It's already there. But I need to know just
 what the deal with it is.

If you ask, the main code of Blender is in C and the current language
for Blender is C.
Yes we have library in C++ like Ghost, Audaspace, etc. but check the
code, if you need to work on Blender, C is the language.
If you are working on a library (for example Ghost), C++ is what you have.

So the basic is, check where are you working and keep that language,
if you have doubt, ask here in the ML.


 /LS

 On 2010-11-15 21:57, Wolfgang Draxinger wrote:
 Am Mon, 15 Nov 2010 21:49:20 +0100
 schrieb Leo Sutic leo.su...@gmail.com:

 I know that it isn't the easiest language out there, but std::vector
 is kinda nice, and basic single inheritance, too. I have no problem
 with C, but that syntactic sugar of C++ is sweet in small doses.

 Please for all gods sake, please don't try to push C++ into Blender.
 It's a horrible language. This so called syntactic sugar creates more
 problems than it solves.

 C is an extremly versatile and powerfull language. And if you know how
 to use it allows for much more OOP than ever possible in C++.

 You may want to polish up your C++ knowledge:
 http://yosefk.com/c++fqa/


 Wolfgang
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers


 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Status of C++

2010-11-15 Thread Wolfgang Draxinger
Am Mon, 15 Nov 2010 22:11:41 +0100
schrieb Leo Sutic leo.su...@gmail.com:

 I wasn't really asking for an opinion of C++, I was asking what the
 community had decided, if anything, in regards to use of the language.

Using C++ in the Blender Kernel would be very troublesome. For one
thing C++ would ruin the whole DNA system. Then most Blender data
structures are organized in form of simple linked objects. If you use
smart_ptr on them things will break.

Doing this kind of thing, which DNA does, sanely in C++ (and with that
I mean also using classes, whistles and bells) is a nightmare.
std::vector would be of only little use, mostly a replacement for
standard C arrays, which are already covered by Blender's guarded
alloc. And if you'd use templates somewhere near the type system then
you introduce a whole new set of problems. Of course some external
helpers may very well be implemented in C++. However if you want to
integrate a larger set of things implemented in C++, one must ask:
Which features subset I am willing to limit myself. As it turns out,
this feature subset boils down to very little above plain C, but with
worse semantics.

And Blender is already in this situation. GHOST, parts of the math
library, Bullet have been implemented in C++, but they're mostly
incompatible among themself and need that C glue between them.


Wolfgang
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers