john gilmore schrieb:
declare (pi value(3.14159_26535_89793_23846),
   sqrt_pi  value(sqrt(pi)) binary float(52) ;

What I find most interesting in this example:
will the sqrt(pi) function call be evaluated at compile time?

I hope so.

What I expect from an optimizing compiler, is, at least, that I don't
get punished if I use normal and pratical language elements, for example

structure = '';

in PL/1, to initialize a (big) structure, all elements with their proper
initialization values, depending on type.

But there were compiler versions which generated such horrible machine code, that in our shop we were told to define a STATIC INITed structure with the same layout and
to do a physical copy out of this INIT structure.

Some of us refused to do so - argueing that it is the job of the
compiler to generate appropriate machine code.

My opinion: if the language allows to express things in an easy and comfortable way, the compiler must support this by generating efficient machine code. Otherwise, if it's not possible, it's better to leave the features out of the language.

And: the user of the language should have an idea of the performance implications of the language elements he or she uses. I'm not sure, if this is always the case - especially
with PL/1 and less experienced programmers.

Kind regards

Bernd

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to