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: Mon, 13 Jul 2015 02:46:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

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

> That's precisely the point. I want the latter, not
> the former.
>
> In your text that I elided you seem to have missed
> the point. It's not about dependencies being somehow
> bad or dangerous or abnormal. ...

"Dependency" is when one program needs another program
to execute. Or whenever a library needs some other
library to do its taks.

When a variable uses another variable to compute its
value, this is perhaps formally a "dependency" but
mostly it is normal programming that happens
every day, all the time.

You mention when you come back to edit code. Then you
want to know if there are (might be) dependencies by
looking at the let or let*. Why? I never do that, but
look at the variables, instead. I don't think about
variable "dependencies" ever, because I assume they
are there because that is the normal state. I don't
need anything to "warn" me the code is normal.

As said, I think code written in the "let* style",
with tons of variables that incrementally show the
computation stepwise, is *much more* clear/easy to
read and edit/less error prone than code where
everything is done in one binding to keep it
"dependency" free. Why would anyone do that?

We can take an example from a C++ project I once did.
I just brought up a file, and immediately I see:

  char* const program_name = const_cast<char*>(program.c_str());
  int arg_array_size = argc + 1;
  char* program_argv[arg_array_size];
  program_argv[0] = program_name;

You see that everything depends on everything. Do you
think this makes any difference?

  /* WARNING - DEPENDENCIES AHEAD */
  char* const program_name = const_cast<char*>(program.c_str());
  int arg_array_size = argc + 1;
  char* program_argv[arg_array_size];
  program_argv[0] = program_name;
  /* Relax - when evil returns, so shall we! */

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




reply via email to

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