Skip to content

[rant] ESM and its end goals #6993

@Maksims

Description

@Maksims

This is a very opinionated rant about ESM and its end actual goals and its effect on the rest of engine and developers.
Would love to ask the team: what is the end goal of ESM.

IMHO:

  1. Cutting off a couple of dozen kilobytes from a built engine (treeshaking), is neglectable when talking about 95%+ of web apps using way more for assets.
  2. The burden of doing imports/exports, forces developers to always pay attention: "did I forget to import a thing?", during development need to remember to remove not used any more imports. Although not writing pc. everywhere - is nice (can overcome with 5 lines of code though).
  3. Flexibility-wise, the new ESM system does not do anything extra in terms of scripting system vs the current (classic) system. It has no new features and actually has fewer features.
  4. It pollutes API with "alternative-ways", which means github, forums, code examples and everywhere we will see a mixture of ways of achieving the same goal while using different ways. It is bad for the learning curve of an API, and it has long-term lasting effects.
  5. A lot of opinionated and "emotional" phrasing is used throughout docs regarding ESM, which means it is somewhat emotionally driven. Personally, I believe devs should make their own emotional attachments and beliefs regarding how great or not a feature is. Like the docs tries to justify the whole ESM thing.
  6. We do use engine v2+ outside of the Editor, with ESM, and we see no much difference with projects where we use v1. The only major difference is that we have to use more sophisticated bundlers now, instead of simple script concatenation + minification. And due to bundlers taking a long time, this cannot be used while developing, like we used to use concat before to improve local development loading times.
  7. The move towards ESM also does already affect and touch other parts: how to add components to entities, and this is only the beginning. This leads to changes, that do not actually help developers make better stuff.

And most importantly, it takes vast amounts of time from the engine/editor team to implement it. While that time could have been spent on way more impactful features:

  1. Improving Editor UX
  2. Introducing new Engine features
  3. Introducing new Editor tools
  4. Polishing existing Editor tools
  5. Expanding Assets workflows
  6. Making more great demos and improving documentation

Basically, creating stuff, instead of changing existing well-working things without a clear "end goal" that would benefit everyone.

It took around a year, and it is not here still. And who knows how much more it will take. While that time is spent on it, other features are not developed for the developers.

My wish is that the team would focus on features and improvements that actually help developers create better stuff!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions