javascript vision thing

Florian Bösch pyalot at gmail.com
Mon Nov 27 23:17:02 UTC 2017


On Thu, Nov 2, 2017 at 4:43 AM, kai zhu <kaizhu256 at gmail.com> wrote:

> > the primary reason is because traditional oop skills gained from
> c#/c++/java/python/etc translate poorly to javascript.
>
I've never found that to be the case.

>in javascript, class-instantiated objects are inferior to plain-objects,
> because plain-objects come with JSON.stringify/JSON.parse baked-in, while
> classes require needless extra serialization/deserialization routines which
> can easily double your codebase or more (as real-world javascript-code is
> heavily i/o based). i would say many people burn-out from
> frontend-programming because they can’t cope with debugging all the i/o
> edge-cases serializing/deserializing their custom classes.
> >
> >javascript and frontend-programming is essentially about efficiently
> managing the program-state like a baton, constantly passing it
> back-and-forth between the browser’s ui and various backend-servers /
> persistent-storage. plain json-objects utilizing idiot-proof
> JSON.stringify/JSON.parse, are naturally better at this baton-passing
> business than writing classes with custom serializers.
>
I dislike many things about JS, and I've been writing JS since 2002. It
never occured to me, not once, until 3 minutes ago, that this was in any
way, shape or form some significant JS disadvantage, primary concern of
anything or even any sort of impediment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20171128/a1624324/attachment.html>


More information about the es-discuss mailing list