I'm in favor of whatever makes it easier to contribute, and if a
contributor uses classes and it was appropriate (like there could be
more than one instance of it), should be fine
On Sat, Dec 1, 2018 at 12:28 AM GearĂ³id M wrote:
>
> I'm definitely in favour of using classes. Personally I find
I'm definitely in favour of using classes. Personally I find them easier to
read and write. We are already using them in at least one place, the
ProjectBuilder in cordova-android.[1] This came about from a refactor I did a
few months ago, and since we dropped support for Node 6, it made sense
I'm in favor of ES6 classes.
But that doesn't mean that everything that _can_ be written with classes
should. Pick the right tool for the job.
While you can achieve the same object structure by just extending the
prototype, classes have the benefit of keeping related code parts close
to
+1 for using modern JS wherever applicable.
Am Fr., 30. Nov. 2018, 06:55 hat Darryl Pogue
geschrieben:
> I both agree and disagree with your points :P
>
> To your first point, yes ES6 classes are just syntactic sugar around
> prototypes, but that sugar exists for a reason and it's extremely
>
I both agree and disagree with your points :P
To your first point, yes ES6 classes are just syntactic sugar around
prototypes, but that sugar exists for a reason and it's extremely
popular now. Personally, I've been using class syntax at work for
going on three years now, and looking at some
I would not personally favor using ES6 classes, here are my main reasons:
* ES6 class is really sugar around prototypal inheritance, unlike many
other languages
* In many cases it is better to use functional programming and factory
functions than classes
Some reading:
*