[erlang-questions] Erlang Core question: nested expressions vs. let?

Dimitry Golubovsky <>
Thu Apr 17 17:16:09 CEST 2008


Hi,

Would be there any difference in compilation/execution of bytecode of
these two Erlang Core expressions:

1.  foo(bar(_a))

2. let _b = bar(_a) in foo(_b)

In other words, does putting nested expressions in `let' make any
difference for the compiler?

Assume that both `foo' and `bar' functions do not have side effects.

Thanks.

PS The nested form compiles fine by erlc, however when I look at what
erlc produces when run with +to_core on an Erlang source, there are
only `let' forms in the generated Core. My Core files are either
hand-written or auto-generated.

-- 
Dimitry Golubovsky

Anywhere on the Web



More information about the erlang-questions mailing list