How are Implicit-Heap dynamic Storage Binding and Dynamic type binding similar

bindinglanguage-agnosticprogramming-languagesstorage

"Concepts of Programming languages" by Robert Sebesta says –

Implicit Heap-Dynamic Storage Binding:

Implicit Heap-Dynamic variables are bound to heap storage only when they are assigned values.
It is similar to dynamic type binding.

Can anyone explain the similarity with suitable examples. I understand the meaning of both the phrases, but I am an amateur when it comes to in-depth details.

Best Answer

The example once again from Robert Sebesta's Concepts of Programming Languages 9th edition:

highs = [74, 84, 86, 90, 71];

This Javascript array is only brought into being when its assigned values. It then gets placed in the heap as a collection of those values.

It would bind those values to that variable. It would not necessarily tell you what type they were. That part will be dependent on other language semantics.