Ecma262: What is means digest in ECMAScript document?

Created on 20 May 2018  路  7Comments  路  Source: tc39/ecma262

If you open Module section, you will be able to see:

Its fields _contain digested information_ about the names that are imported by the module and its concrete methods _use this digest to link_, instantiate, and evaluate the module.

What is mean digest?
P.S Word digest used only in Module section.

question

Most helpful comment

I wrote the original sentence that used "digested":

So I can translate "digested" as "processed" and "digest" as "processed data"?

I think a better translation would be: "digested" as "extracted" and "digest" as "the extracted data"; because the information isn't is actually transformed. It is just collected. In English, "process" could imply that the information has been manipulated in some way.

The "digested information" exists in the source code of a module and could be obtained each time it is needed by reanalyzing the source code. But its easier in the specification to make reference to the digested information than it is describe how to analyze the source code each time some information is needed

All 7 comments

"digest" means "to arrange in convenient or methodical order; reduce to a system; classify."

The text says that Source Text Module Records have fields that contain "digested information", meaning, information that was classified and arranged methodically. As a noun, "digest" means "a collection or compendium, usually of literary, historical, legal, or scientific matter, especially when classified or condensed." - so, it's saying that the concrete methods use the "collection of information" to link, instantiate, and evaluate the module.

@ljharb May https://en.wikipedia.org/wiki/Universally_unique_identifier be "digest" in this occurence?

@dSalieri no, a UUID would be a single unique identifier; in this case the "digest" is a collection of key/value pairs.

@ljharb So I can translate "digested" as "processed" and "digest" as "processed data"?

I wrote the original sentence that used "digested":

So I can translate "digested" as "processed" and "digest" as "processed data"?

I think a better translation would be: "digested" as "extracted" and "digest" as "the extracted data"; because the information isn't is actually transformed. It is just collected. In English, "process" could imply that the information has been manipulated in some way.

The "digested information" exists in the source code of a module and could be obtained each time it is needed by reanalyzing the source code. But its easier in the specification to make reference to the digested information than it is describe how to analyze the source code each time some information is needed

@allenwb Can you show example of "digested information" in the source code of a module? I can not yet imagine this abstraction.

One might imagine that such information might be an AST, for example.

Closing, since this was answered in https://github.com/tc39/ecma262/issues/1197#issuecomment-390451045

Was this page helpful?
0 / 5 - 0 ratings