help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What does "lacks a prefix" mean?


From: Emanuel Berg
Subject: Re: What does "lacks a prefix" mean?
Date: Sun, 12 Jul 2015 03:47:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> Harm? Why would *harm* be the only useful or the
> most useful criterion?
>
> There's no harm in writing Lisp with no whitespace
> at all, except for that needed to distinguish tokens
> such as symbols and numbers.
>
> And in fact I once had a colleague (an expert Lisper,
> BTW) who wrote Lisp that way, always - no newline
> chars, no indentation, no spaces or tabs at all,
> except what was needed by the interpreter or
> byte-compiler to disambiguate the code.
>
> No one else wanted to read, let alone modify his
> code, but hey, no "harm" done, right?
>
> He wrote his code at lightning speed, hardly looking
> at it. And his code was *good* code - for the
> applications and the machine. It just wasn't very
> good for humans (other than himself, arguably, and
> I'm not sure he didn't shoot himself in the foot
> sometimes).

I do see the harm in doing as your former colleague but
I don't see the harm in using `let*' instead of `let'.
Apart from convention which can be reprogrammed in the
minds of programmers, even. And, as it stands, apart
from me not liking the syntax (spelling) of "let*"
compared to "let".

> I would say this about using `let' vs `let*' wrt
> what they indicate to human readers: `let' indicates
> that the bindings are independent; `let*' signals
> that they might be dependent.
>
> I don't see a red flag from `let*', but yes, it does
> make me pay attention and look for dependencies.
> That "might be" is where I agree with Barry: `let*'
> makes you look for whether each binding after the
> first might in fact be dependent on a previous one
> from the same `let*'.
>
> It's a huge load off one's mind knowing that the
> bindings of a `let' are independent. Similarly, it
> is a great help to know, from `let*', to look for
> how the bindings are actually related.
>
> The problem with using `let*' all the time ("harm",
> actually) is the problem of affixing the same
> **WARNING** label to absolutely everything - it
> loses all power to draw attention to anything.
> If everwhere might involve binding dependencies then
> you have no signal to watch for them. You need to
> always be on the alert - or never.

This all makes sense if the premise is that
dependencies are anything to look for, be aware of, be
"on the alert", as you say.

But - why do you want to look for them at all?
What does it matter? On the contrary, I consider them
completely natural and a good thing. It is *good* for
humans to see that computation is done in steps, and
for machines, that is the way it happens anyway - it
doesn't matter if you have one all but neverending
line:

    (let ((value (computation_1 ( ... (computation_n ...))))))

or the same procedure on a vertical line with names to
illustrate the process. But, to humans, it is more
clear and less error prone, and it is easier to
modify and debug.

If we turn the discussion upside down, if dependencies
indeed were a reason to be on the alert - then I'd
like a much better and more specific construct than
`let*'! If dependencies were something to look for,
I wouldn't want a construct that says "here, there
*might* be dependencies", instead I'd like a construct
that said "here, there *is* a dependency, namely
X depends on Y in terms of Z!"

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]