Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8441
| From | Retahiv Oopsiscame <roopsisc@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Style Police (a rant) |
| Date | 2011-10-01 06:49 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <e112a92b-d99e-4220-82c8-d85cddb388e6@g29g2000yqh.googlegroups.com> (permalink) |
| References | (12 earlier) <j4t2ik$5vp$1@speranza.aioe.org> <31be6d6b-3026-4767-a188-5f233a44cbf2@d18g2000yqm.googlegroups.com> <j53auh$cdt$1@speranza.aioe.org> <82ad7095-9bc3-4308-b246-12b8e2dc7f0c@j19g2000vbn.googlegroups.com> <j5r25g$4ti$1@speranza.aioe.org> |
On Sep 26, 7:34 pm, Cthun <cthun_...@qmail.net.au> wrote:
> On 26/09/2011 6:13 PM, Retahiv Oopsiscame wrote:
> > On Sep 17, 7:36 pm, Cthun<cthun_...@qmail.net.au> wrote:
> >> On 16/09/2011 6:26 AM, Retahiv Oopsiscame wrote:
> >>> On Sep 15, 10:37 am, Cthun<cthun_...@qmail.net.au> wrote:
> >>>> [calls me a liar]
>
> >>> No! None of the nasty things that you have said or implied about me
> >>> are at all true.
>
> >> What?? Where did I call you a liar?
>
> > Two posts ago.
>
> [calls me a liar]
No, no, a thousand times no! None of the nasty things that you have
said or implied about me are at all true.
> >> Lisps tend to accrue fairly standard libraries of third-party macros
> >> everyone learns to recognize.
>
> > More complexity to learn. And this stuff is supposed to make the
> > programmer's job *easier*?
>
> All programming languages and libraries have "complexity to learn".
Some more than others.
> >> And of course you usually have access to the macro's source.
>
> > "Having access to" and "being able to read and understand" can
> > sometimes be worlds apart. In my years of working with other peoples'
> > code, I've seen shit that will turn you white. Also check out The
> > Daily WTF.
>
> Fortunately, standard library macros don't tend to be terrible like that
> -- at least for open source implementations.
Need I remind you once again of your own bugabear, the LOOP macro?
> >> The ability to define functions or classes already suffices to allow
> >> programmers to turn a language into a Tower of Babel,
>
> > Call semantics for functions are well defined -- argument evaluation,
> > etc. Those for macros are pretty much arbitrary -- whatever the macro
> > author intended. (Or didn't, but caused anyway.)
>
> [insult deleted].
No. None of the nasty things that you have said or implied about me
are at all true.
> What a function's results are is just as arbitrary, but we accept functions.
The behavior with respect to argument evaluation isn't arbitrary. And
functions don't potentially behave differently if one of the arguments
contains an expression with a variable with one name, versus a
semantically equivalent expression with another name.
For example, in Java if I have
int x = 3;
int y = someObj.someMeth(x);
and change it to
int z = 3;
int y = someObj.someMeth(z);
the semantics doesn't change. But if someMeth was replaced with
someLispMacro, that might no longer be the case if the macro has
internal local variables named x or z.
To make it even more concrete, suppose someMeth is a static method of
SomeClass rather than an instance method of someObj and it's
public static void someMeth (int a) {
int z = 18;
return z*a;
}
(trivial, yes, and no real need for the local, but just for argument's
sake).
This will work fine with the second call above (if someObj is of
SomeClass): you'll get 54 returned.
But what happens if it's made into a macro instead, which inlines the
above code? Then it performs substitution rather than passing
arguments in a function-calling manner and ends up as
int z = 18;
return z*x;
or
int z = 18;
return z*z;
and we get 54 with the first call above but 324 instead with the
second one!
Again, you may have some klunky method to namespace the local z here
to make name collisions like this less likely, but accidents can and
will happen and the resulting bugs will be exceptionally difficult to
track down because a widespread programmer expectation is violated.
Indeed who will think to see if changing the *name* of a variable in
the calling procedure will magically fix it?
> >> yet nearly all languages allow user-defined functions and/or classes in
> >> some form or another, and ones that allow neither are considered archaic
> >> and crippled.
>
> > A car without an automatic ignition would also be considered archaic
> > and crippled; that doesn't mean a car without a satellite radio would
> > be.
>
> What about one without fuel injection?
Macros are hardly like fuel injection.
> >>> Something familiar in how you write. You remind me of someone I had a
> >>> very long argument with here, long ago. Appropriately, his name was
> >>> "Bent".
>
> >> [implied insult deleted]
>
> > No. None of the nasty things that you have said or implied about me
> > are at all true.
>
> WTF??
You heard me. I said none of the nasty things that you have said or
implied about me are at all true.
> >> Quick quiz:
>
> > I finished school a while ago. Go fuck yourself.
>
> Okay. [implied insult deleted]
None of the nasty things that you have said or implied about me are at
all true.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Re: Style Police (a rant) Retahiv Oopsiscame <roopsisc@gmail.com> - 2011-09-12 21:54 -0700
Re: Style Police (a rant) "Cthun" <cthun_117@qmail.net.au> - 2011-09-13 07:18 -0400
Re: Style Police (a rant) Cthun <cthun_117@qmail.net.au> - 2011-09-13 10:07 -0400
Re: Style Police (a rant) Lew <lewbloch@gmail.com> - 2011-09-13 08:15 -0700
Re: Style Police (a rant) Cthun <cthun_117@qmail.net.au> - 2011-09-13 12:00 -0400
Re: Style Police (a rant) Cthun <cthun_117@qmail.net.au> - 2011-09-13 10:10 -0400
Re: Style Police (a rant) Retahiv Oopsiscame <roopsisc@gmail.com> - 2011-09-13 09:55 -0700
Re: Style Police (a rant) Cthun <cthun_117@qmail.net.au> - 2011-09-15 10:37 -0400
Re: Style Police (a rant) "Cthun" <cthun_9112011@qmail.net.au> - 2011-09-15 22:58 -0400
Murphy = Troll [DO NOT FEED] thoolen <th00len@th0lenbot.thorium> - 2011-09-16 00:23 -0400
Re: Style Police (a rant) Retahiv Oopsiscame <roopsisc@gmail.com> - 2011-09-16 03:26 -0700
Re: Style Police (a rant) un-Bent <dob@dib.dib.null> - 2011-09-16 13:02 +0000
Murphy = Troll [DO NOT FEED] thoolen <th00len@th0lenbot.thorium> - 2011-09-16 22:40 -0400
Re: Style Police (a rant) Cthun <cthun_117@qmail.net.au> - 2011-09-17 19:36 -0400
Re: Style Police (a rant) "kaffel'latte" <jiggingjava@qmail.net> - 2011-09-19 08:58 -0400
Re: Style Police (a rant) thoolen <th00len@th0lenbot.thorium> - 2011-09-19 11:56 -0400
Re: Style Police (a rant) "kaffel'latte" <jiggingjava@qmail.net> - 2011-09-19 17:05 -0400
Re: Style Police (a rant) thoolen <th00len@th0lenbot.thorium> - 2011-09-19 19:13 -0400
Re: Style Police (a rant) k00k Derbyshire spins freely "kaffel'latte" <jiggingjava@qmail.net> - 2011-09-19 20:45 -0400
Re: Style Police (a rant) k00k Derbyshire spins freely thoolen <th00len@th0lenbot.thorium> - 2011-09-21 18:37 -0400
Re: Style Police (a rant) Retahiv Oopsiscame <roopsisc@gmail.com> - 2011-09-26 15:13 -0700
Re: Style Police (a rant) Cthun <cthun_117@qmail.net.au> - 2011-09-26 19:34 -0400
Re: Style Police (a rant) Retahiv Oopsiscame <roopsisc@gmail.com> - 2011-10-01 06:49 -0700
Re: Style Police (a rant) Lew <lewbloch@gmail.com> - 2011-10-01 09:21 -0700
Re: Style Police (a rant) Cthun <cthun_117@qmail.net.au> - 2011-10-01 14:17 -0400
Re: Style Police (a rant) Wanja Gayk <brixomatic@yahoo.com> - 2011-10-01 20:53 +0200
Re: Style Police (a rant) Cthun <cthun_117@qmail.net.au> - 2011-10-01 21:12 -0400
Re: Style Police (a rant) Retahiv Oopsiscame <roopsisc@gmail.com> - 2011-10-05 06:17 -0700
csiph-web