On Wed, 19 Mar, 2014 at 2:09 PM, Anders Logg <[email protected]> wrote:
On Wed, Mar 19, 2014 at 12:18:10PM +0000, Garth N. Wells wrote:
 Before getting carried away with C++11 features, it would be helpful
 to settle on which features can be used freely in DOLFIN and which
 will require consideration. I've started a list at:

https://bitbucket.org/fenics-project/dolfin/wiki/Development%20guidelines

 As a guide, I suggest anything available in GCC 4.4 is fine and
 anything that is only available is more recent GCC releases than 4.4
 should require consideration and should be proposed on the mailing
 list.

 Once we settle on the list on the wiki, it can be added to the
 coding guidelines page at
 http://fenicsproject.org/contributing/writing_code.html.

 Garth

That list looks good so far. When we add these to the coding
guidelines, we should also add examples (to encourage the use of some
of these features).

Concerning 'auto', do we need more of a guideline than just saying
that it is allowed? It can be used in very many places and may
sometimes make code harder to understand since if used to much, it may
be difficult to figure out what type a certain variable has.

I haven't thought about it or used auto enough to properly judge. I see the benefits being (a) significantly shorter code lines in places; (b) easier development with heavily templated libraries, e.g. CGAL; and (c) avoiding the need for typedefs in some places, so I'd suggest using auto only if it does (a), (b) or (c) (key word in (a) being 'significantly').

Garth



--
Anders

_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to