[erlang-questions] Erlang / C# The Best Interface

Gilberio Carmenates García co7eb@REDACTED
Wed Jan 19 01:42:48 CET 2011


Hi, yes I already thought that but the problem is when you tend to make a
request like this, imagine this three clauses in the receive statement in
Erlang.

 

{insert_person, Name, Age}->

    
.

   ;

 

logoff->

    


    ;

 

{i_like_to_be_here}->

    


    ;

 




 

So for the first case you should do Request(new object[] {
“’insert_person’”, “Ivan”, “26”});   %% new object[]  means new tuple  { }

So if you use Request(params object[])   -> Request(“’insert_person’”,
“Ivan”, “26”) to make a tuple then how you send the simple ‘logoff’ atom?

Like Request(“ ’logoff’ ”);

 

So if you want to send {i_like_to_be_here}   ---->   Request(new object[] {
“ ‘i_like_to_be_here’ ” });

 

How could I specify if I want to send a simple atom or a tuple with a simple
atom inside using the same form

Request(“ ‘i_like_to_be_here’ “);

 

Other cool way could be, example:

string Name = “Ivan”;

Request(“ {‘insert_person’, Name} ”); but hum
 seems to me I need to use a
lot of ‘Reflections’ perhaps using F#.

 

Using F# that would be nice to rebuild the component!! Using close pattern
matching like Erlang in F# and Erlang expressions. 

That could be really fun!!!.

 

Best,

 

 

Ivan.

 

 

 

De: Tim Watson [mailto:watson.timothy@REDACTED] 
Enviado el: Martes, 18 de Enero de 2011 15:59
Para: Gilberio Carmenates García
CC: erlang-questions@REDACTED
Asunto: Re: [erlang-questions] Erlang / C# The Best Interface

 

Pretty cool. I like the dynamic feel of `erlangServerRequest1.Request(new
object[] {“’insert_person’”, “Ivan”, 26, “Male”});` but couldn't you define
the `Request` method using a param-array (i.e., Request(params object[]
args) { ... }) so as to avoid the noisy object array instantiation at the
call site? 

 

Silly me nit-picking though. Looks like a nice API - I'll have a play
integrating Erlang with F# this weekend. :) 



=======================================================================
Este mensaje ha sido enviado mediante el servicio de correo electrónico que ofrece la Federación de Radioaficionados de Cuba a sus miembros para respaldar el cumplimiento de los objetivos de la organización y su política informativa. La persona que envía este correo asume el compromiso de  usar el servicio a tales fines y cumplir con las regulaciones establecidas.


More information about the erlang-questions mailing list