"<span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Then we would have someone like you complaining the opposite and proposing we all do it the way it is now..."</span><div>
<font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Another strawman. Where do I advocate using multi-clause fun syntax for named functions *exclusively*? I don't. Clearly, even if the proposal here were wildly popular, there would be the problem of compatibility with existing code.</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">"</span></font>Practical considerations would be better defined through education for core language features."</div>
<div><br></div><div>Where have I suggested changing even ONE single core language feature?</div><div><br></div><div>Strawmen, strawmen, strawmen.</div><div><br><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">-michael turner<br>
</span></font><br><div class="gmail_quote">On Thu, May 19, 2011 at 1:11 AM, Parnell Springmeyer <span dir="ltr"><<a href="mailto:ixmatus@gmail.com">ixmatus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
</div><div class="im">> If I argued only from syntactic consistency, you'd have a point.<br>
> Frankly, I don't really care about syntactic consistency, if it doesn't<br>
> get me something. Having to type less gets me something. Having more<br>
> readable code gets me something. Those are practical considerations,<br>
> not mere pedantic ones. Dude.<br>
<br>
</div>How do you type more? When I type a ";" in my editor it auto-completes<br>
the function clause for me, that is an empty argument for changing<br>
something so trivial.<br>
<br>
Practical considerations would be better defined through education for<br>
core language features.<br>
<div class="im"><br>
> What you have as<br>
><br>
> some_func(X, Y) -><br>
> %% Long bit of code<br>
> ...;<br>
> some_func(X, []) -><br>
> %% More code<br>
><br>
> could, as I proposed above, also be written<br>
><br>
> some_func<br>
> (X,Y) -> %% long bit of code<br>
> ...;<br>
> (X,[]) -> %% More code<br>
> ....<br>
<br>
</div>Because, now I would have:<br>
<div class="im"><br>
some_func<br>
(X, Y) -><br>
%% Long bit of code<br>
...;<br>
</div> (X, []) -><br>
%% More code<br>
....<br>
<br>
It makes the "structure" less flat when you start adding in indentation<br>
levels (which you *have* to do if you are writing non-trivial functions<br>
in order to be able to read them two weeks later).<br>
<br>
Again, the style you are suggesting is really well suited for functions<br>
with small and concise function bodies. Which, is well suited for the<br>
lambda. I use this all the time for small functions:<br>
<br>
SomeFun = fun (X, Y) -> %% Short peice of code;<br>
(X, []) -> %% Short peice of code.<br>
<br>
It's obviously much easier and quicker to read - but I don't beleive<br>
that is the case with named functions.<br>
<div class="im"><br>
> Why is this less readable to you? You could answer, "Because it's not<br>
> what I'm used to seeing in Erlang programs," but that begs the<br>
> question. If people were more used to seeing the latter -- because<br>
> making Erlang syntactically more self-consistent made it possible --<br>
> that argument wouldn't have much force -- except as an argument from<br>
> pure conservatism.<br>
<br>
</div>Then we would have someone like you complaining the opposite and<br>
proposing we all do it the way it is now - that person would probably be<br>
me.<br>
<div class="im"><br>
> And this is entirely apart from "long bit of code" being a classic<br>
> Smell anyway:<br>
><br>
> <a href="http://www.soberit.hut.fi/mmantyla/BadCodeSmellsTaxonomy.htm" target="_blank">http://www.soberit.hut.fi/mmantyla/BadCodeSmellsTaxonomy.htm</a><br>
<br>
</div>This is why I used the word "pedantic", don't I know abstraction and<br>
orthogonality is preferred over monolithic functions? Of course I<br>
do. But, what does one consider "long"? Some functions I write are<br>
/better/ written as a long function to avoid unnecessary (read:<br>
pedantic) abstraction that actually clouds the intent.<br>
<br>
- --<br>
<div class="im">Parnell "ixmatus" Springmeyer (<a href="http://ixmat.us" target="_blank">http://ixmat.us</a>)<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)<br>
Comment: GPGTools - <a href="http://gpgtools.org" target="_blank">http://gpgtools.org</a><br>
<br>
</div>iQEcBAEBAgAGBQJN0++gAAoJEPvtlbpI1POLn14H/2yY/dpNJVrMOnSPVrxjFRBY<br>
peMjGJZM/tRmReMWM9b6Df+hoRMXmPqZ+253LaAKYTfuehlowwXvG/HBRiFNB+vv<br>
+rOIcP/OOqeJNJp3MtRIKxKvqiubQMKfbalxh4Au0xzCp70o6fKYKQKZY1hS6TiY<br>
jtkeKxXU4vnmGockYhAlUlHNJLmopbVZGk97XZ2NtAqFDI8UmaWCZfSK7zN7Ebnm<br>
HLIXrv13TrwHy/i9xonuGrOvV8W7QPtzspGQxcix3a6JMEFox2E06tBRBHcVK1I8<br>
tAB6i9RVblWUqi4i4a1jjan9rk/p366sPz3yBUQVnPmgdezaA/q+mxsGxBAp6pE=<br>
=YwFM<br>
-----END PGP SIGNATURE-----<br>
</blockquote></div><br></div></div>