[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: |
Tue, 28 Jul 2015 02:24:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Robert Thorpe <rt@robertthorpeconsulting.com> writes:
> For what it's worth, this is my opinion on let vs
> let*.
>
> When there's a dependency between two of the
> variables I use let*. If there's no dependency at
> all I use let. So, if the code defining y depends on
> the code defining x then I use let*.
>
> I don't like the style where let* is used for
> everything. Here's an example of the problem.
> Suppose you're reading through a function. You have
> a local variable z and you want to understand what
> values it could have. To begin with you want to
> understand what could happen at the beginning of the
> body of the let statement z is defined in.
>
> I.e.:- (defun foo () "blah blah" (let* ((a
> (something)) (b (something-else ...)) (z
> (something-more))) ... here... ...rest of the code...)
>
> Now, let's say the programmer has used let. In that
> case I know by looking that I don't have to read the
> definitions of a & b. Alternatively, suppose the
> programmer has used let* even though z isn't
> dependent on a or b. In that case let* indicates to
> me the reader that they should read the definitions
> of a & b. But, doing that isn't immediately
> necessary, I may not need to understand the details
> of a & b to understand the problem.
This is the exact same tiresome argument that has been
put forward several times by now and the argument is
still only logical within the framework that is "this
is the way people do it". Yes: I know!
In the other framework, where it is natural and
*desired* that things depend on each other and happen
stepwise - nothing to be afraid of and nothing that
must be marked specifically as it is the natural order
of things - in that framework it doesn't make
sense (surprise, surprise!).
There is a framework of convention but beneath that
there is technology. On top of that we can create any
framework of our minds as we desire. If we create one
that doesn't make sense in terms of technology, if we
use it enough, we'll even start to like it! It is sly!
> It's easy to be critical of the process of
> restructuring or refactoring code. It's inevitable
> in large codebases though.
OK, so how many lines of zsh, C, C++ and Lisp do you
have to write before it gets inevitable to "refactor"
it? I ask because I did my biggest projects in those
languages but apparently they weren't big enough
because I never did any "refactoring", whatever that
is, if it isn't the very normal and everyday thing
that is writing, improving, and fixing bugs in code,
in what case I have done it every day for many years!
What is all this talk?!
I don't understand this whole defaitiste "we know the
drill" mentality. "It is just the way it is." It isn't
- what it is is an empty buffer and it doesn't have to
be anything and it can be whatever you want it to be!
"Do it today, in a different way!" (Scooter 2010)
> The cost and time of rewriting them is simply too
> large. Even if the original is badly written it
> generally contains undocumented features that people
> rely on. If a large program is well written that
> doesn't mean it won't need modifications regularly.
So, everything is so bad, we have to have let/let* -
it is inevitable!
--
underground experts united
http://user.it.uu.se/~embe8573
- Re: What does "lacks a prefix" mean?, (continued)
- Re: What does "lacks a prefix" mean?, Emanuel Berg, 2015/07/10
- RE: What does "lacks a prefix" mean?, Drew Adams, 2015/07/09
- Re: What does "lacks a prefix" mean?, Emanuel Berg, 2015/07/11
- RE: What does "lacks a prefix" mean?, Drew Adams, 2015/07/12
- Re: What does "lacks a prefix" mean?, Emanuel Berg, 2015/07/12
- Re: What does "lacks a prefix" mean?, Yuri Khan, 2015/07/13
- Re: What does "lacks a prefix" mean?, Emanuel Berg, 2015/07/13
- Re: What does "lacks a prefix" mean?, Yuri Khan, 2015/07/14
- Re: What does "lacks a prefix" mean?, Emanuel Berg, 2015/07/14
- Re: What does "lacks a prefix" mean?, Robert Thorpe, 2015/07/18
- Re: What does "lacks a prefix" mean?,
Emanuel Berg <=
- Re: What does "lacks a prefix" mean?, Robert Thorpe, 2015/07/29
- Message not available
- Re: What does "lacks a prefix" mean?, Rusi, 2015/07/29
- Re: What does "lacks a prefix" mean?, Rusi, 2015/07/29
- Re: What does "lacks a prefix" mean?, Emanuel Berg, 2015/07/09