TC39 and ECMAScript What’s in store for the next 20 years? · ECMAScript is an object-oriented...

Preview:

Citation preview

TC39andECMAScriptWhat’sinstoreforthenext20years?

AllenWirfs-BrockMay24,2017

ECMAScriptwillbe20yearsoldnextmonth

2016’smostpopularprogramming

language:JavaScript

StackOverflow2016DeveloperSurveyhRp://stackoverflow.com/research/developer-survey-2016

1JavaScript2Java3PHP4Python5C#5C++5Ruby8CSS9C10Objec]ve-C

RedMonkTop10ProgrammingLanguagesJanuary2016

hRp://redmonk.com/sogrady/2016/02/19/language-rankings-1-16/

hRp://www.robert-drummond.com/2015/06/19/in-what-universe-is-javascript-the-new-c/

EachCompu]ngErahashadCanonicalProgrammingLanguages

CorporateCompu]ngEra–COBOL/FortranPersonalCompu]ngEra–C/C++family

JavaScript:TheCanonicalLanguageoftheAmbientCompu]ngEra

TC39isn’tjustarubberstampstandardsbody.

It’sthedesignteamforthisera’s

canonicalprogramminglanguage.

AsJavaScriptgrowsandevolves,

somustTC39

Today,TC-39isn’tlikeeitherofthese

Challenge:HowcanTC39scaletothis

Challenge:

Isitatallmeaningfultotalkaboutachievingconsensusata100+

personmee]ng?

Challenge:

WithoutaBDFL,howdowecon]nuetoevolveJavaScriptwhilepreservinga

coherentdesignesthe]c

FirstversionAug2009UpdatedasneedThissnapshotJuly2011

hRp://wiki.ecmascript.org:80/doku.php?id=harmony:harmony

Harmony/ES6hadaplan

APossibleExemplar:WG21

≈1oopeople

hRps://isocpp.org/std/the-commiRee

TheC++commiReeholdstwoorthreefullweek-longface-to-facemee]ngsayear.Onemee]ngayearistradi]onallyheldoutsidethecon]nentalUnitedStates–ofeninEurope,butperiodicallyinCanadaorHawaii,oroccasionallyintheCaribbean,Japan,orAustralia.TypicalaRendancerangesfrom90to100people.Thesearefive-orsix-daymee]ngs(Mon-FriorMon-Sat),andbeginandendwitheveryoneinthesameroomforaplenarysession:OnMondaymorning,wemeettogethertoorganizeworkfortheweek,andattheendoftheweekwemeettoconsiderchangerecommenda]onsreadytobebroughtbeforethewholecommiReeforapprovalpolls.Therestofthe]meisspentinsmallersubgroupswheremostofthetechnicaldiscussionsoccur.

Part2

Some]mesit’sagoodideatoreexaminefundamentalassump]ons

andearlydesigndecisions

ECMA-262Edi]on1Clause4,Paragraph1

ECMA-262,Edi]on1(1997)said:

ECMAScript is an object-oriented programming language for performing computations and manipulating computational objects within a host environment. ECMAScript as defined here is not intended to be computationally self-sufficient; indeed, there are no provisions in this specification for input of external data or output of computed results. Instead, it is expected that the computational environment of an ECMAScript program will provide not only the objects and other facilities described in this specification but also certain environment-specific host objects, whose description and behaviour are beyond the scope of this specification except to indicate that they may provide certain properties that can be accessed and certain functions that can be called from an ECMAScript program.

DrafECMA-2622018says:

WhyDoesECMAScriptNeeda“Host”?

GeneralPurposeandSpecializedLibraries

HostedECMAScriptPlanormIntegra]on

Processor+OS

MainProgram+AppModules

AbstractedPlanormSeman]cs

Planorm

“TheHost”

Applica]onProgramLibraries

StandardLanguageSeman]cs“Engine”Host/EngineAPI

Host’sDomainSpecificAbstrac]onsandProcesses

HostDomainObjects

ExtendedESLanguageSeman]cs

HostDefinedPlanormObjs

HostDefinedExternalObjs

ImplementAbstractedPlanormSeman]cs

Added-valueServices

ForeignLibraries

GeneralPurposeandSpecializedLibraries

HostedECMAScriptPlanormIntegra]onw/HostFFI

Processor+OS

MainProgram+AppModules

AbstractedPlanormSeman]cs

Planorm

“TheHost”

Applica]onProgramLibraries

StandardLanguageSeman]cs“Engine”Host/EngineAPI

Host’sDomainSpecificAbstrac]onsandProcesses

HostDomainObjects

ExtendedESLanguageSeman]cs

HostDefinedPlanormObjs

HostDefinedExternalObjs

ImplementAbstractedPlanormSeman]cs

Foreignfunc]on

callsupport Added-value

Services

ForeignLibraries

GeneralPurposeandSpecializedLibraries

Conven]onalProgrammingLanguagePlanormIntegra]on

Processor+OS

MainProgram+AppModules

StandardLanguageSeman]csAbstractedPlanormSeman]cs

Planorm

Added-valueServicesRun]meSupport

Applica]onProgram

LibrariesForeignLibraries

GeneralPurposeandSpecializedLibraries

Conven]onalProgrammingLanguagePlanormIntegra]onw/FFI

Processor+OS

MainProgram+AppModules

StandardLanguageSeman]csAbstractedPlanormSeman]cs

Planorm

Added-valueServicesRun]meSupport

Applica]onProgramExternal/Foreigncallinterface

LibrariesForeignLibraries

GeneralPurposeandSpecializedLibraries

HostlessECMAScriptPlanormIntegra]on?

Processor+OS

MainProgram+AppModules

StandardLanguageSeman]cs AbstractedPlanormSeman]cs

Planorm

Added-valueServicesRun]meSupport

Applica]onProgramExternal/Foreigncallinterface

LibrariesForeignLibraries

Couldwebuildthistoday?Notquite🙁

•  Thingsthataremissingandcurrentlydefinedbyhosts–  Incompletesetofabstractedplanormseman]cs;notcurrentlyspecifiedintheECMAScriptstandards•  Even]ng• Worker/Agent/ThreadsandcontrolAPI•  Realms•  Moduleloadingreflec]on

– AstandardForeignFunc]onInterfacespecifica]on•  EG,defineaFFImodulesyntax

Recommended