sfztools / sfizz

SFZ parser and synth c++ library, providing a JACK standalone client
https://sfz.tools/sfizz/
BSD 2-Clause "Simplified" License
418 stars 58 forks source link

Code style wishlist #510

Open jpcima opened 4 years ago

jpcima commented 4 years ago

A few ideas, all open to discussion

Edit:

redtide commented 4 years ago

Sorry, I "edited" it by mistake but not changed anything, like a "I'm a simple man, I see a checkbox and I select it." :-P If I can put my cent on it that sounds like the way I use to code except:

  1. the _ suffix, which I agree but still about personal taste (e.g. also as prefix or m_ prefixed
  2. I like the bad doc comment and I never understand why automatic Doxygen editors puts all those unneeded asterisks where starting with an indentation looks more clean and readable to me, but this is also (my) personal taste

Despite the 2 personal points above all of that makes sense to me.

paulfd commented 4 years ago

I'm okay with all this, I have no strong opinions. I tend to prefix with _ in python but I'm flexible :)

I also think we could pimpl everything if you wish. One thing that we may discuss is the Impl& impl = *impl_; that you put in the parent calls: what's the reason?

jpcima commented 4 years ago

I tend to prefix with _

The prefix _ is reserved for compilers.

what's the reason?

It's for no other reason than to help the compiler, writing such a this as impl_->x dereferences twice.

jpcima commented 4 years ago

Added an item regarding the include file order, see the top comment