Re: Strangest language feature
by Argorak on Sunday March 24, 2013 @02:59PM
(#5433079)
Erlang is rusty and sometimes very different, but rarely strange.
[ Parent
| on HN ]
Re: Strangest language feature
by andrewflnr on Sunday March 24, 2013 @03:26PM
(#5433180)
Speak for yourself ;). Erlang's conditionals are weird, by any mainstreamish standard. And that's ok, they're sorta cool once you get them.
As someone who started programming in ML and later in Prolog, they are far from weird.
Other than that, they are not a "strange language feature", they don't behave in unexpected or unclear ways.
While `!` is certainly a very special piece of erlang, its also not strange as well, as in say.... Ruby flipflops?
Re: Strangest language feature
by andrewflnr on Tuesday March 26, 2013 @09:48PM
(#5447275)
Fair enough. I don't consider ML and prolog to be "mainstreamish", and I'm defining "strange" to mean "unusual".
It's strange in the sense that Willy Wonka's fizzy lifting drinks are strange in a factory with oompa loompas and chocolate rivers. Any good experience is going to change your brain and feel strange at first. :-)
I think "[x]." returning a certain character when 7<x<256 is pretty strange. There's probably a reason for this, but I'm pretty new to the language.
It's that Erlang doesn't have strings or characters. It has string syntax on input, which turns into lists of small integers, and also on output. But under the covers, those apparent strings are just lists of integers.