Erlang Versus Python
Thu Mar 2 17:08:13 CET 2000
"Steven H. Rogers" wrote:
> Python has some functional features, though they're not as well
> integrated into the language as they could be.
Yes, it the terms of possibility to create functions, the answer will be
:YES, oterwize, the arrpoach are different. Python do not support
pattern matching, sample:
a(10, abc) ->
Will be three different functions in Erlang, In the Python you can't do
this. If you'll tell:
def a(a1, b1):
The second "a" will be substitute the first one. You can use the
keyworks as parameters, like:
def a(*params, **kw):
params - tuple
kw - dictionary
a(a,b,c,d, e="hello", f="world") will looks: params=(a,b,c,d);
But in this case, you should check the types and data youself. It's a
possible to emulate Erlang like pattern matching by importing the
different modules, but it's taff. In the terrms of functions, the Python
staying close to the Unix shell scripting and probably Perl (but of
course, it's more flexible through *params and *kw)
> > you talking about, Erlang - having mnesia;
It's a lot of opinions how mnesia good in some specific applications,
but it's exists and doing things which actually very useful, like
transparent network replications.
> could use something like Gadfly or Interbase, but would have to take
> care of the distribution myself.
Some of Python databases can't do distributed replications at all (it's
really depend from which database we gonna to use).
%% Vladimir I. Ulogov () AT&T Labs
"Where lands meets water. Where earth meets air. Where body meets
mind. Where space meets time. We like to be on one side, and look
at the other." D.Adams "Mostly harmless"
More information about the erlang-questions