What Is a Singleton Typed Array?

I'm trying to understand what is asm.js and what does it do, and I am reading this article here, by Alon Zakai: What asm.js is and what asm.js isn't

He first talks about emscripten.js and explains that the pattern by which it compiles C++ to JS uses a singleton-typed array to make C++ feel at home in JS:

That pattern involves using a singleton typed array to represent memory (p. 7)

I know what a singleton object is and what the 'singleton pattern' looks like in Javascript, but what is a singleton-typed array? A Google search came up with nothing.

EDIT: I also do understand what Emscripten does and that pattern in question of implicitly-typed, but statically-typed variables (i.e. variables' types don't change throughout runtime), but still, the wording "singleton typed array" is beyond me.

6

1 Answer

I got it. It's not "singleton-typed array", but "singleton typed-array". Bah. I find English to be a vague language at certain areas. Here you go, curious ones: Typed Arrays (MDN)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest