[erlang-questions] The Beauty of Erlang Syntax

Michael McDaniel erlangy@REDACTED
Sat Feb 28 00:45:52 CET 2009


On Fri, Feb 27, 2009 at 12:55:01PM +0100, Joe Armstrong wrote:
> On Thu, Feb 26, 2009 at 11:26 PM, Michael McDaniel <erlangy@REDACTED> wrote:
> > On Thu, Feb 26, 2009 at 10:43:57PM +0100, Joe Armstrong wrote:
> >> for(Max,Max,F) ->  F(Max);
> >> for(I,N,F) -> F(I),for(I+1,Max,F).
> >>
> >> for(1,10, fun(I) -> io:format("...." end)
> >>
> >> The code is *shorter than the documentation"
> >>
> >> writing the code is quicker than finding the documentation and reading it - this
> >> is true in most programming languages which is why programmers write
> >> code.
> >>
> >> This happens all the time I wanted hex2int after 20 seconds in google I gave up
> >> and wrote it myself - this is also true for javascript C, ... as Wirth once said
> >> It is better to know one langauge very well that to know many languages
> >> incompletely..
> >>
> >> Hint: read books and type in the examples. for/3 is in my book :-)
> >> don't rely on the web for information - (example Douglas Crockford's
> >> Good Parts of JavaScript - I learnt more in half an hour reading this
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> >
> >  ... and which new *Haskell* book captured you ?
> >
> >
> 
> Real world Haskell - or course - " a cracking good read" I highly recommend it.
> 
> Reading it made me realise how similar Haskell and Erlang are under
> the surface, once we absract away from minor details like type
> systems, evaluation strategies and concurrency.
> 
> The basic problem of writing Haskell is the same as writing Erlang - ie
> getting the data to the right part of the program, which means a deal of
> hokie pokie in both languages.
> 
> /Joe Armstrong
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


   thank you

~M


> 
> 
> 
> >
> >  I enjoyed and learned from your
> >    http://pragprog.com/titles/jaerlang/programming-erlang
> >  and recently (pre) purchased
> >    http://www.manning.com/logan/
> >
> > ~Michael
> >
> >
> >
> >
> >> than dozens of
> >> hours reading appallingly bad articles on the web)
> >>
> >>
> >> /Joe Armstrong
> >>
> >>
> >> On Thu, Feb 26, 2009 at 10:12 PM, Zvi <exta7@REDACTED> wrote:
> >> >
> >> >
> >> >
> >> > Kevin Scaldeferri wrote:
> >> >>
> >> >> If you want to have only one way of doing anything, perhaps you should
> >> >> try Python.  I hear that's one of their design principles.
> >> >>
> >> >
> >> > Kevin,
> >> > I playing a devil advocate here (actualy some company paid me to be a
> >> > devil's advocate :)
> >> > I can adopt to any syntax and semantics. I already use Erlang and love it. I
> >> > just think of it as a low-level language, kinda parallel and distributed
> >> > COBOL :) There are some simple things that hard to do in Erlang. That's the
> >> > reason, why project like Disco uses combination of Erlang+Python and Fuzed -
> >> > Erlang+Ruby.
> >> >
> >> >
> >> > Kevin Scaldeferri wrote:
> >> >>
> >> >> Anyway, the point is, if times() is something you do a lot, just write
> >> >> it and get on with your life.  If it matters to you a lot, make an
> >> >> argument for why it's generally important and submit a patch to the
> >> >> standard libraries.
> >> >>
> >> > Obviously you didn't read the list of things hard in Erlang, simple in other
> >> > langs. Repeat N times, is just a simplest example. In Jim Larson's
> >> >
> >> > Times, just a case of "for" loop.
> >> > I working on generic collections library for Erlang, where will be ranges.
> >> > Someting like:
> >> >
> >> > R = gc_range:new(1,10).
> >> > gc:foreach(fun(_)->io:format("hi~n") end, R).
> >> >
> >> > Zvi
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context: http://www.nabble.com/The-Beauty-of-Erlang-Syntax-tp22179816p22233815.html
> >> > Sent from the Erlang Questions mailing list archive at Nabble.com.
> >> >
> >> > _______________________________________________
> >> > 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
> >
> > --
> > Michael McDaniel
> > Portland, Oregon, USA
> > http://trip.autosys.us
> > http://mmcdaniel.com/erlview
> > _______________________________________________
> > 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