Naatan
Naatan

Reputation: 3444

Camelcase, Underscore, etc. - how committed should you be?

Ok, I'm not trying to start a discussion on Camelcase vs Underscore here, it doesn't matter what you pick, just stick to your choice.

Rather, what I would like peoples opinion on, is how strict and committed you should be in your choice when importing third party libraries.

Especially in PHP there is a HUGE variety of coding styles, to the point where it's just damn near impossible to maintain one specific style throughout your codebase when you use third party libraries.

So what do you guys do? Modify those libraries to suit your conventions, write some sort of interpreting layer so that when you use those libraries the usage of them still follows your conventions? Do you just say "to hell with it" and mix it all together? Or is there some other ingenious solution that I haven't thought of (apart from simply not using libraries that don't follow your convention)?

In essence what I'm asking is; how do you manage to maintain a clean and consistent coding style when using third party libraries? Can it be done?

Upvotes: 2

Views: 391

Answers (1)

BenH
BenH

Reputation: 2120

I say "to hell with it" and mix it all together. It can be somewhat annoying to have the mixed styles, but I don't think it's worth it to do a bunch of work to avoid this.

Upvotes: 1

Related Questions