News for hackers. Stuff that matters.
Re:Why we are choosing Clojure as our main programming language by dylanz on Monday March 21, 2011 @01:22PM (#2350640)
Good read, and I just read this post while attending Erlang Factory in SF, in the middle of a talk about Lists and Strings :)

I asked the teacher about your comment on String manipulation. Yes, it is pretty in-efficient. There are libraries to make manipulation easier, and, you can always go down to binary types, which is much more performant.

We chose to use Erlang for a variety of reasons, and String manipulation isn't a problem for us (it's definitely a pre-mature optimization point (for us) at the moment).

Re:Why we are choosing Clojure as our main programming language by nivertech on Monday March 21, 2011 @01:42PM (#2350731)
Erlang strings is just a syntactic sugar over lists.

  1> [104,105].
  "hi"
  
  2> [$h,$i].  
  [104,105]
  
  3> "hi".
  "hi"
Which is efficient for some uses (i.e. iterating over UTF32 characters) and inefficient for others (high memory usage).

You can always use:

  * atoms - for interned strings or enums
  * binaries - for memory efficiency (i.e. UTF8 byte sequences)
  * IO-lists - for efficient appending and IO.
What I would like is a per-module compiler directive/pragma, which will turn every "string" into <<"string">>, while @"string" will remain syntax sugar for list.
Re:Why we are choosing Clojure as our main programming language by gislik on Monday March 21, 2011 @01:37PM (#2350705)
I resonate well with many of the reasons for why one chooses Erlang in a project. I guess it all depends on the problem domain :)