1
1

はじめに

This section contains a non-normative overview of the ECMAScript language.

Overview・・・和訳すると「概要」ですが、
ここでは "non-normative" ・・・「非規範的な」ものについて書かれているようです。

non-normative とは

"non-normative" ・・・「非規範的な」とは、何のことでしょうか?

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 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.

ECMAScriptは、計算処理を行うための言語です。
その実行のためには、例えば外部ファイルを読み込んだり、DOM操作をしたり・・・といった機能が必要です。

これらの機能は「ホスト環境」つまりNode.jsや各種ブラウザによって実装が変わります。

「非規範的な」とは、これらの「ホスト環境」によって実装が変わるもの・・・標準化できないものを指してるんですね。サーバーからフロントエンド、幅広く使用されるJavaScriptならではですね。

ホスト環境によって変わるものの例

いくつかピックアップしてみましょう。

  • Host-defined Objects

    • global object:ブラウザのwindowオブジェクトやNode.jsのglobalオブジェクトが該当
  • Any built-in objects and methods not defined within this specification

    • 各ホスト環境独自の組み込みオブジェクトやメソッド
      ブラウザのfetchやNode.jsのrequire
  • HostCallJobCallback

    • ジョブのコールバック関数を呼び出すためのとっかかり
      ブラウザのsetTimeoutなど

おわりに

短いですが、いったんこれにて締めさせていただきます。
ECMAScriptを読むにあたって正体不明だった「ホスト環境」のイメージを掴むことが目的なので。

続きも書く予定です。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1