Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Intuitively I understand "elaboration" and have a very mild idea. But I want to know exactly what is elaboration of a declaration?

I came across this word in this context:

Stack dynamic storage bindings are created for variables when their declaration statements are elaborated.

The quote is from "Concepts of Programming languages" Robert Sebesta .

share|improve this question
3  
Where's that quote from? –  Yannis Rizos Mar 23 '12 at 11:52
add comment

1 Answer

up vote 8 down vote accepted

From Robert Sebesta's Concepts of Programming Languages 9th edition:

Elaboration of a declaration refers to the storage allocation and binding process that takes place when the code containing the declaration is executed.

Okay, what does that mean?

Stack Dynamic variables are allocated to the stack. Hardware in the case of native code. Software in the case of a a virtual machine. This means that they are pushed on to the stack when the code containing them is executed. Static variables on the other hand are bound and given values at load time when the program begins running.

How then is this useful? Well, functions generally get sent to the stack when they execute along with the passed parameters. In addition to being faster than the heap, this allows for recursive calls.

As a historical note, Elaboration as a term originated with Algol 68.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.