[glideplan_swproj] Re: [glideplan_swproj] Coding practices

  • From: Tomáš Zámečník <pulcik@xxxxxxxx>
  • To: glideplan_swproj@xxxxxxxxxxxxx
  • Date: Mon, 16 Jan 2012 19:05:30 +0100 (CET)

It's not a signal fot rewriting all.
...If it is necessary, we should do it with some refactoring.

T.

> ------------ Původní zpráva ------------
> Od: Tomáš Zámečník <pulcik@xxxxxxxx>
> Předmět: [glideplan_swproj] Coding practices
> Datum: 16.1.2012 19:03:00
> ----------------------------------------
> Good evening to all,
> I think that (beside style checker validation) we should keep some coding
> practices.
>
> Following comes in my mind:
>
> * For passing parameters (except elemtary types) should be used reference
> instead of value.
> e.g.: void setName(const QString &name) instead of: void setName(QString name)
>
> * Similarly big structers shouldn't be returned as a value (use out parameter
> instead)
> e.g.: void getList(List *numbers) instead of: List getList()
> ...the best version is in my opinion: void getList(List &numbers), but our
> style-checker doesn't allow it.
> (There is bug in style checker - it doesn't allow non-const reference for 
> first
> param, but allows for others)
>
> * Comments for methods should be in header file instead of cpp.
> Interface is then specified by commented method headers (separated from
> implementation)
> Cpp is sometimes inaccesible (when using precompiled libraries) ...I know, 
> it's
> not our case,
> but we should use one style.
>
> T.
>
> To visit archive or unsubscribe, follow:
> http://www.freelists.org/list/glideplan_swproj
>
>
>

To visit archive or unsubscribe, follow:
http://www.freelists.org/list/glideplan_swproj

Other related posts:

  • » [glideplan_swproj] Re: [glideplan_swproj] Coding practices - Tomáš Zámečník