[erlang-questions] Fwd: Function Declaration Syntax
Mon May 16 07:39:48 CEST 2011
Begin forwarded message:
> From: Richard O'Keefe <>
> Date: 16 May 2011 5:39:11 PM NZST
> To: Justus <>
> Subject: Re: [erlang-questions] Function Declaration Syntax
> On 16/05/2011, at 4:19 PM, Justus wrote:
>> On Mon, May 16, 2011 at 11:06 AM, Richard O'Keefe <> wrote:
>>> Why not?
>>> That's how you do do it in mathematics when defining a recurrence.
>>> That's how it's done in Haskell.
>>> That's how it's done in SML.
>>> That's how it's done in every functional language I know that _has_
>>> multiple clauses (so, not in Lisp).
>> That's not good reasoning.
> Sure it is. It goes like this:
> (A) A certain kind of notation is widespread in a certain area.
> (B) Therefore people should not be surprised to find that notation
> used in that area.
>> Mathematica (it's as a FP language as Lisp)
>> also lists function names in each parameter pattern, but its semantics
>> is quite different from Erlang:
>> say[n_] := "n";
>> say := "zero";
> So what? How does this make repeating the name a bad thing to do.
>> The reason of the existence of function names here is mainly to help
>> us/ctags, etc not to get lost in code, although Joe said no deep
>> though is involved. That's OK, I like it.
> In fact Joe denied ctags being a reason. He just followed a tradition.
>> Regarding eep-0028, I think putting ";" at the beginning of a line is
>> totally a bad idea, a big error in typesetting.
> It has nothing to do with typesetting.
> If only Dijkstra hadn't died, I could have told him you thought his
> code layout was "totally a bad idea, a big error".
>> There is already a
>> symbol for alignment, "(".
> No, that is NOT a symbol for alignment.
> How can you use "(" for alignment in "if", "case", "try",
> or "receive"? You can't. But you *can* use ";".
>> PS, after learn something about J, one might start to dislike anything
>> that seems to be redundant.
> I learned J many years ago, and very quickly learned to dislike J.
> *Limited* redundancy is necessary for detecting and diagnosing errors.
More information about the erlang-questions