[x3d-public] C++ SAI: setters and addChildren return void

Holger Seelig holger.seelig at yahoo.de
Sun Dec 15 05:54:35 PST 2024


Function chaining is a very convenient way to make the code clearer and to save time.

Holger,
Regards.

--
Holger Seelig
Leipzig, Germany

holger.seelig at yahoo.de
https://create3000.github.io/x_ite/

> Am 15.12.2024 um 11:05 schrieb John Carlson via x3d-public <x3d-public at web3d.org>:
> 
> This link discusses many options for C++.  If method chaining is not preferred, how about examples with “auto “?  See link.  I don’t really know about auto, since my C++ knowledge dates from the 90s.
> 
> https://stackoverflow.com/questions/2279180/does-c-have-with-keyword-like-pascal
> 
> I don’t mind code generation, indeed, if void is promoted in the standard, I would be happy, because my generator and parser already work.
> 
> John
> 
> On Sun, Dec 15, 2024 at 3:29 AM John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com>> wrote:
>> I had a look at:  
>> https://github.com/Web3DConsortium/X3D/blob/master/ISO-IEC19777/ISO-IEC19777-4/ISO-IEC19777-4v3.3/ISO-IEC19777-4v3.3-IS/Part04/abstracts.html
>> 
>> I have some comments from a usability position.
>> 
>> For example, not returning “this” from setters, addChild and other adders (I think only addChild does not exist), while good for debugging, requires a lot more duplicated code, in the form of repeated use of variable names in the code.  Please make me aware of examples if this is not required.
>> 
>> Here is an HAnim example:
>> 
>> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/cplusplus/net/coderextreme/data/JinLOA4.cpp
>> 
>> I don’t know if C++ contains the concept of Pascal’s “with” (creating a context or namespace where repeated use of a variable name is not required) and should would be documented in any C++ examples produced by the Consortium (IMO).
>> 
>> Is there going to be an X3D XML to C++ stylesheet converter to give best practices, or are we on our own?
>> 
>> John 
>> 
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20241215/f432e11d/attachment-0001.html>


More information about the x3d-public mailing list