[erlang-questions] Simple Erlang Recommendation (last returned value)

Alain O'Dea alain.odea@REDACTED
Sat Jul 26 00:02:34 CEST 2008


Mutability is encapsulated in processes for a very good reason. I will  
strongly protest the introduction of mutable variables into Erlang. If  
you really want mutable state, spawn a process to manage it and send  
messages to it for the various actions. A process is very similar to  
an Object in that regard. This is how things like code:add_path/1 work.

On 25-Jul-08, at 5:13 PM, Andrew Stone wrote:

> IMO this appears a bit dangerous. It seems like the OP is simply  
> trying to get around Single-Assignment. I don't see any need for it  
> personally.
>
> -Andrew
>
>
>
> ----- Original Message ----
> From: James Hague <james.hague@REDACTED>
> To: erlang-questions@REDACTED
> Sent: Friday, July 25, 2008 1:33:39 PM
> Subject: Re: [erlang-questions] Simple Erlang Recommendation (last  
> returned value)
>
>> And an equivalent to Perl's $_
>
> Or there could be a prefix, like an asterisk, that means "fresh
> symbol."  For example:
>
> *A = something()
> *A = something_else()
>
> Need to decide what this means:
>
> [A, *A | T] = something()
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list