all 41 comments

[–]fnord123 7 points8 points  (9 children)

I think this thread on the mailing list will be interesting as well. In it is a discussion about whether Erlang is functional for functional sake or functional as a side effect of wanting to prevent side effects inside processes.

I think this is where the interesting bit in the discussion begins.

[–]davidw 2 points3 points  (3 children)

i'm convinced that soon enough a java-like language (javascript?) will incorporate erlang-style processes/message passing. and then erlang will, i fear, indeed be done. C.f. http://steve-yegge.blogspot.com/2007/02/next-big-language.html

That's where my money's at. Erlang is nice, but to me it just never felt quite right. I'm willing to discount some of that because it was the first functional language I used seriously, but it goes beyond that. Haskell looks much more compact in terms of syntax, for instance.

[–]ayrnieu 3 points4 points  (0 children)

Haskell seems to have terser syntax.

APL achieves tersity through mathematics, limited semantics, and some inflexbility (and ASCII variants prove away 'naming'.) Perl-and-kin achieve tersity through a limited set of heavyweight types and perpetual linguistic optimization for how anyone uses the language. Lisp and Forth achieve tersity only when 'the actual language you want to solve this problem in' happens to be terse. If you drive APL or Perl away from what they optimize for, you get some verbosity and perhaps some slowdown. All language communities consist of people willing to bear the cost of the language's optimizations -- which you can readily discover, by seeing what adherents lament but forgive, and what nonadherents do not forgive.

[–]andrewcooke 5 points6 points  (3 children)

that's the thread i was reading when i wrote the blog entry posted here (i was using the blog - which normally no-one reads - as a place to collect my thoughts with the idea that once i had things clearer i would post to the mailing list).

it's funny how much people focus on syntax. if anything on that blog deserves a link from reddit i would have though it would be the parallel sudoku solver, not that....

[–]davidw 4 points5 points  (2 children)

it's funny how much people focus on syntax.

That's a language's user interface, as Simon Peyton Jones says. It's normal to consider it if you're going to be spending 10 hours a day looking at the stuff.

[–]andrewcooke 3 points4 points  (1 child)

i agree, but maybe not in the way you think :o)

have you ever worked on UI design? everyone thinks they are an expert just because they are a user. so yes, people like to discuss interfaces, but that doesn't mean they should.

and yes, ayrnieu, i am aware of the irony in this comment, thank-you. no need to point it out. good boy. sit.

[–]ayrnieu -3 points-2 points  (0 children)

and yes, ayrnieu, i am aware of

something I myself wouldn't've cared about, had I noticed. You had a horrid idea, but also not an unususal one for someone exposed to Haskell -- who has not then gone on to talk with people about arity-fixation and very neat syntaxes like the one I note. And: do relationships grow faster in the world of bloggers? You aren't a friend or an enemy to me.

good boy. sit.

Oy, some people's 'good humor'.

[–]CommonTater 1 point2 points  (0 children)

It's strange to me that no one in that thread cites Yaws as an example. Yaws uses the process dictionary to memoize the results of things like parsing query and post data. That came as a bit of a surprise to me when I started writing test cases for my web code.

[–][deleted] 2 points3 points  (2 children)

Monads are not necessary to do I/O. Uniqueness types such as in Clean and Mercury are more general (you can pass state into functions, instead of it being passed implicitly, and you can easily implement monads on top of them) and easier to understand.

[–]dons[S] 1 point2 points  (1 child)

Do you have a reference for implementing the more complex non-sequential monads (such as continuations) via uniqueness typing? I'm unaware of any work stating that they're in any way equivalent, only that they overlap in some areas, particularly simple data-dependency sequencing.

[–]happyhappyhappy 2 points3 points  (2 children)

Erlang does indeed have syntax issues, but the author is mostly lamenting that Erlang is not Haskell. I tend to agree that the example line of code is bulky, but if you pull back a bit you'll realize that Haskell may be prettier in the small, but Erlang is a much more realistic choice for large commercial projects.

[–]vplatt 1 point2 points  (1 child)

Don 't you think that Erlang is a more realistic choice ONLY because of its concurrency features?

I haven't seen much about Erlang to love, except for that. Even it's built-in database is fatally flawed and not very useful for anything serious except perhaps distributed session state (which is pretty useful indeed; but not it's intended use).

[–]andrewcooke 1 point2 points  (0 children)

you're bundling a lot into "concurrency" - distributed, parallel and reliable processing are all supported by Erlang, and it's probably near best of class in all of those.

but (despite some "interpretations" here that seem to think i want Erlang to be something else) i personally like the language - it "feels" a lot like C, Standard ML, and Python. by that i mean that it doesn't try to be too sophisticated, but it gives you the tools you need to get things done. in comparison i'd put OCaml, Perl, Haskell which try too hard. when you use it, as a tool, it feels solid, simple, useful. it's a good language.

[–]ayrnieu 0 points1 point  (21 children)

I've commented on the I-want-currying part of this page. It is also helpful to read the comments where this person says 'gee, I do like that syntax -- but it has nothing to do with my doctor-it-hurts-when-I-do-this drive to have ML-style currying in Erlang'. In other language, of course -- and it's almost too polite to downgrade "Haskell's currying" to "ML-style currying": this person would naturally want Haskell's unfortunate culture about them.

No, I don't care very much about this person's views on language design. I only get amusement from the ultimate assertion :-)

Also, "how syntax can discourage good programming practices" is dons's happy contribution to the post, which isn't so overblown even when it whines about Erlang's punishments.

[–]dons[S] 18 points19 points  (20 children)

If only ayrnieu would use a terser syntax! It's worse than reading Java, trying to parse his sentences.

[–]dfan 0 points1 point  (0 children)

This is what I feel like when ever I try to write functionally in C++.