Current status of ES6 "class" implementation.

Talk about code development, features, specific bugzilla bugs, enhancements, patches, and other highly technical things.

Moderator: satrow

Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific referenced Bugzilla bugs, mercurial, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Most "bug reports" do not belong in this board and should initially be posted in Community Support or other relevant support boards.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
BenFenner
Fanatic
Fanatic
Posts: 146
Joined: Mon, 01 Jun 2015, 12:52
Location: US Southeast

Current status of ES6 "class" implementation.

Unread postby BenFenner » Tue, 05 Dec 2017, 14:33

As the sole champion of Pale Moon at my web development shop, it has fallen on me to make this thread.

We just spent some time debugging odd JS behavior on one of our sites (they are very light on JS as a general rule) which only Pale Moon exhibits (tested working in Opera, FF, IE, Chromium, Chrome, Safari, and Edge). We narrowed it down to the seeming lack of support for the ES6 `class` keyword in Pale Moon.
I found this thread on the topic: viewtopic.php?f=13&t=14589&hilit=es6+class

I would have bumped that thread from January 2017, but it is locked. With all due respect, it seems to be 11 months since the last mention of this on the forum and the locked thread leaves tons of unanswered questions about the future of this feature. I'm not entirely sure what to expect with this as PM progresses. Is support not planned, ever? Or are we as forum members just not allowed to discuss it? Or what?

Either way, I'd like to see what the current state of things are in this area. We may have a work-around for our specific issue now, but I'd like to keep myself informed about the state of this feature in Pale Moon (hence this thread).
I realize support for this may be very difficult. I'm just wondering if there is a vague plan to eventually support this? Or a solid plan to eventually support this? Or is support ever to be expected? With this information, I can make better educated plans for our shop's future. Thank you.
Last edited by BenFenner on Tue, 05 Dec 2017, 15:13, edited 1 time in total.

BenFenner
Fanatic
Fanatic
Posts: 146
Joined: Mon, 01 Jun 2015, 12:52
Location: US Southeast

Re: Current status of ES6 "class" implementation.

Unread postby BenFenner » Tue, 05 Dec 2017, 14:38

I'm reading how divisive "class" is in JavaScript: https://medium.com/javascript-scene/how ... 42bb3f4caf

To be clear, our shop is not trying to use "class" in JavaScript. We are merely making use of a 3rd party plug-in that relies on it. We may find alternatives. JavaScript we write ourselves is not the problem.
I may go make a bug report for this 3rd party plug-in.
Last edited by BenFenner on Tue, 05 Dec 2017, 14:57, edited 1 time in total.

BenFenner
Fanatic
Fanatic
Posts: 146
Joined: Mon, 01 Jun 2015, 12:52
Location: US Southeast

Re: Current status of ES6 "class" implementation.

Unread postby BenFenner » Tue, 05 Dec 2017, 14:52

I've submitted a report to the 3rd party plug-in: https://github.com/peek/peek-performance_bar/issues/30

User avatar
Sajadi
Keeps coming back
Keeps coming back
Posts: 931
Joined: Fri, 19 Apr 2013, 00:46

Re: Current status of ES6 "class" implementation.

Unread postby Sajadi » Tue, 05 Dec 2017, 15:44

On Github this special one is marked with a bounty sign. Means, it waits for someone to implement it who has time and that special knowledge which is required for implementation.

if you have perhaps an idea of a person who could do it, feel free to forward them towards the specific Github post :)

https://github.com/MoonchildProductions ... ssues/1243

BenFenner
Fanatic
Fanatic
Posts: 146
Joined: Mon, 01 Jun 2015, 12:52
Location: US Southeast

Re: Current status of ES6 "class" implementation.

Unread postby BenFenner » Tue, 05 Dec 2017, 16:10

Sajadi, thanks for the explanation and link. That's exactly what I needed. If I find anyone who can tackle the issue, I will pass it on. :thumbup:

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 22013
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: Current status of ES6 "class" implementation.

Unread postby Moonchild » Wed, 06 Dec 2017, 10:12

As regards locked threads: all threads on this forum are automatically locked after a specific period of inactivity (more than half a year since the last activity) to prevent necro-posting on long-closed and concluded discussion topics that has been an constant issue lately. Don't take this kind of lock as a dismissal of the topic.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 22013
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: Current status of ES6 "class" implementation.

Unread postby Moonchild » Wed, 07 Mar 2018, 09:34

An update to this thread.

I've done some more work on getting the dependencies in (e.g. "super") but the more I see about how this all hooks together, the more ES6 classes are plainly a BAD IDEA, especially how it is all specced.
With classes you're going to generate a very fragile dependency chain that works in a way completely a-typical to the way JavaScript normally works. I really don't think the little bit of convenience it creates for people wanting to do C++ abstraction comes anywhere near being proportional to the cost for the language as a whole.
Classes in JS are simply a really, really bad idea, trying to enforce OO structures from a different language to something that is simply not designed to do things that way.

There's also no reason to use classes per se, as anything done with classes can be done with basic and completely compatible use of JS prototypes. Prototyping is there for a reason; use it.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne

BenFenner
Fanatic
Fanatic
Posts: 146
Joined: Mon, 01 Jun 2015, 12:52
Location: US Southeast

Re: Current status of ES6 "class" implementation.

Unread postby BenFenner » Thu, 08 Mar 2018, 15:55

Interesting reading. Thanks for the update! :thumbup:


Return to “Development (discussion)”

Who is online

Users browsing this forum: No registered users and 2 guests