[erlang-questions] Process scope variable

Vlad Dumitrescu vladdu55@REDACTED
Thu Feb 19 14:38:23 CET 2015


Hi Imants,

Are you sure that you will still understand the program flow in 3 or 6 or
12 months from now, especially if you will be working with something else
in between?

Are you sure that the "state server" will only be written to from only one
process? You might be throwing away exactly what Erlang is good at and will
be in no better position than if you had implemented the code in Java or
C++. At least, you might want to use an ETS table instead, where you can
get some kind of protection if implemented correctly.

In my experience, it is usually a poor solution to try to use a different
paradigm than the one the language/environment offer natively (I tried it
in many ways). It can be done, but it requires more work than one thinks
from the beginning, it might become less understandable than one had
planned and in the end it might be faster/simpler to go with a different
language/environment, if the choice of paradigm is not negotiable.

regards,
Vlad


On Thu, Feb 19, 2015 at 2:16 PM, Imants Cekusins <imantc@REDACTED> wrote:

> > "ok, a method called 'fred'.  Wonder what it does?"
>
> well let's just say if I understand program flow, this is not a
> problem. If I do not understand it, long explicit signatures are not
> of much help.
>
> my problem was that until now my mind was too cluttered with function
> signatures.
>
> now when I look at a function body, I can focus on what happens within
> this function. I will worry about other functions in turn - when I
> look at them.
>
> basically, navigating the code will happen much less often. the mind
> can take a rest.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150219/75e04f7d/attachment.htm>


More information about the erlang-questions mailing list