• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
52

P: [PS Scripting] ExtendScript support for ECMAScript 6th version

Community Beginner ,
Jul 23, 2015 Jul 23, 2015

Copy link to clipboard

Copied

ExtendScript as it's implemented in Photoshop Scripting engine is compliant to:

- ECMA-262 (version 3)
- EX4 (EcmaScript for XML)

plus other custom stuff like Filesystem management, Reflection interface, operator overloading, etc.
It's a great language, but... the rest of the Javascript world has moved to ECMA-262 version 6 aka ES6 Harmony, while so to speak we're stuck at ES3.

We don't have native support (among the rest) of JSON, Array.indexOf, Promises, Object.create, etc...

It's becoming increasingly difficult to interface with JS libraries, since shims are not always available/functional.

Also, strategically, we're in a cul-de-sac (aka dead end): there hasn't ever been a major language update (besides ScriptUI changes to support different rendering engines over the years), the PS Scripting language cannot not-evolve now that JS seems to have gained a great momentum and it's as lively as it's never been in the past.

My feature request is not to substitute ExtendScript with JS tout-court (since it would mean give up to EX4 and proprietary stuff), but to incorporate the new ES6 syntax and features - give ExtendScript a place in the future.

Thank you very much,

Davide Barranca
---

[weblinks removed by moderator]

 

Idea No status
TOPICS
Actions and scripting , macOS , SDK , Windows

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , May 12, 2022 May 12, 2022

While it's true that UXP is built on V8 and has a far more up-to-date JavaScript engine than ExtendScript (We're well past only "ES6" these days), it would be disingenuous to say that UXP _implements_ this request, since modern JavaScript also _omits_ E4X and other ExtendScript features as listed in the original request. That is to say, UXP is not a drop-in replacement for ExtendScript, and can't be used as such. Any ExtendScript scripts have to be rewritten to work in UXP, and that can be chall

...

Votes

Translate

Translate
22 Comments
LEGEND ,
Jul 23, 2015 Jul 23, 2015

Copy link to clipboard

Copied

I completely agree with Davide. Please add support for this!

Votes

Translate

Translate

Report

Report
LEGEND ,
Jul 23, 2015 Jul 23, 2015

Copy link to clipboard

Copied

ES6 would be super useful in PS for us script/extension writers. Please help us make your product better for the users!

Votes

Translate

Translate

Report

Report
Community Beginner ,
Jul 23, 2015 Jul 23, 2015

Copy link to clipboard

Copied

Unfortunately I don't have the faintest idea what this is all about since I stopped programming a decade ago. But I know Davide and everything he does is truly reasonable.

Votes

Translate

Translate

Report

Report
Community Beginner ,
Jul 23, 2015 Jul 23, 2015

Copy link to clipboard

Copied

🙂 Thank you, from now on I'll ask my wife to call me Davide "reasonable" Barranca!

Votes

Translate

Translate

Report

Report
Engaged ,
Jul 23, 2015 Jul 23, 2015

Copy link to clipboard

Copied

+1

Votes

Translate

Translate

Report

Report
Community Beginner ,
Jul 23, 2015 Jul 23, 2015

Copy link to clipboard

Copied

My mistake, I should have written 'E4X' (ECMA357) - thanks to @indiscripts for reporting!

Votes

Translate

Translate

Report

Report
Enthusiast ,
Jul 23, 2015 Jul 23, 2015

Copy link to clipboard

Copied

I do need this for our workflow optimization!

Votes

Translate

Translate

Report

Report
LEGEND ,
Jul 23, 2015 Jul 23, 2015

Copy link to clipboard

Copied

Davide' extensions are critical for mine, and my clients, workflows, I'd love for him to have the widest toolset possible for his work, thanks Davide.

Votes

Translate

Translate

Report

Report
LEGEND ,
Jul 23, 2015 Jul 23, 2015

Copy link to clipboard

Copied

Thumbs up, it's very frustrating having to "cut back" on what you know and like is the best way to code JS because it'll not work with ESTK. We have regularly updated Chrome in panels and modern Node.js in Generator, but ESTK is holding all those back.

Votes

Translate

Translate

Report

Report
Engaged ,
Sep 10, 2015 Sep 10, 2015

Copy link to clipboard

Copied

Totally agree! I want .forEach() and .map()!

Votes

Translate

Translate

Report

Report
Participant ,
May 31, 2016 May 31, 2016

Copy link to clipboard

Copied

Having to play the "is this basic native function supported or not" game is not a fun one. Having to write and/or include my own versions of things like Array.firstIndexOf() is frustrating.

Votes

Translate

Translate

Report

Report
Guest
Jun 26, 2016 Jun 26, 2016

Copy link to clipboard

Copied

I support this request! 
An update with ECMAScript 6 features would allow to code cleaner, better, faster, stronger.

Votes

Translate

Translate

Report

Report
LEGEND ,
Jul 08, 2016 Jul 08, 2016

Copy link to clipboard

Copied

Voted! Beside this the ToolVM javaScript engine is extremely slow compared to PanelVM's.

Votes

Translate

Translate

Report

Report
Participant ,
Oct 28, 2016 Oct 28, 2016

Copy link to clipboard

Copied

+1

ExtendScript needs some love! Otherwise a lot of our work will become useless very soon.

Votes

Translate

Translate

Report

Report
LEGEND ,
Nov 22, 2016 Nov 22, 2016

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community Expert ,
Mar 24, 2022 Mar 24, 2022

Copy link to clipboard

Copied

Given that UXP is not using s the V8 JavaScript engine which supports ES6, this thread should be tagged as implemented, no?

Votes

Translate

Translate

Report

Report
Community Beginner ,
May 08, 2022 May 08, 2022

Copy link to clipboard

Copied

OMG, please. Working around with old ECMA is so exausting.

Votes

Translate

Translate

Report

Report
Community Expert ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Adobe Employee ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

While it's true that UXP is built on V8 and has a far more up-to-date JavaScript engine than ExtendScript (We're well past only "ES6" these days), it would be disingenuous to say that UXP _implements_ this request, since modern JavaScript also _omits_ E4X and other ExtendScript features as listed in the original request. That is to say, UXP is not a drop-in replacement for ExtendScript, and can't be used as such. Any ExtendScript scripts have to be rewritten to work in UXP, and that can be challenging depending on the feature set of ExtendScript that one used.

 

Given this, the realistic response is as follows:

  • There are no plans to update ExtendScript to support modern JavaScript. ExtendScript will stay at ES3 levels for as long as it is available in a product.
  • Some developers have had success in transpiling from ES5+ to ES3 and having that work in ExtendScript. This is not ideal, but may meet your particular needs. Note that any E4X will get in the way of these transpilers, since they don't understand that syntax.
  • If you want modern JavaScript, UXP is there for you to use. However, the Photoshop API is still being built out, and so you may face some challenges in figuring out how to do certain things. Furthermore, you'll lose the ExtendScript features such as E4X, operator overloading, etc.

 

Given that, I'd close this as "not doing", w/ UXP or transpiling as the suggested workaround. That way we don't set expectations improperly for those not following along w/ UXP closely.

Votes

Translate

Translate

Report

Report
Community Expert ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

Thank you very much for this complete explanation, Kerri ! Way over my head, but I'm sure scripters will understand !

Votes

Translate

Translate

Report

Report
LEGEND ,
May 19, 2022 May 19, 2022

Copy link to clipboard

Copied

I didn't know she has this forum account. How did you know it - there was no any post of her?

Votes

Translate

Translate

Report

Report
Community Expert ,
May 20, 2022 May 20, 2022

Copy link to clipboard

Copied

LATEST

I guessed, and it worked... I could not remember quickly Erin's handle, so I tried hers.

Votes

Translate

Translate

Report

Report