FW: javascript vision thing

doodad-js Admin doodadjs at gmail.com
Thu Nov 2 20:32:36 UTC 2017


-----Original Message-----
From: Claude Petit [mailto:petc at webmail.us] 
Sent: Thursday, November 02, 2017 4:24 PM
To: 'kai zhu' <kaizhu256 at gmail.com>; 'es-discuss' <es-discuss at mozilla.org>
Subject: RE: javascript vision thing

For mostly real OOP under JS, please see my project (doodad-js). But I can't warranty its future without a custom language because nobody on TC39 want to works along-side with me on that project, and they are making their own supposed "classes" which are not.

-----Original Message-----
From: kai zhu [mailto:kaizhu256 at gmail.com] 
Sent: Wednesday, November 01, 2017 11:43 PM
To: es-discuss <es-discuss at mozilla.org>
Subject: javascript vision thing

any thoughts? i'll break the ice with a quora question i recently answered

quora question:
> Why is JavaScript so hated?

answer posted:
>the primary reason is because traditional oop skills gained from c#/c++/java/python/etc translate poorly to javascript.
>
>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.



there's currently a civil war going on in frontend-development, between those who don't want to deal with writing extra class-based serializers/deserializers and those who do.  these 2 different design patterns have incompatible styleguides that often break web-projects when people try to mix-and-match both together.  i don't have a simple solution to this issue, but tc39 should be made aware of it as they try to formulate a javascript vision that doesn't alienate frontend-development.

-kai



---
This email has been checked for viruses by AVG.
http://www.avg.com



More information about the es-discuss mailing list