Wish: Variable Not Used Warning

BCS ao at pathlink.com
Fri Jul 11 10:24:52 PDT 2008


Reply to Markus,

> On Thu, 10 Jul 2008 12:51:47 -0700, Walter Bright wrote:
> 
>> Robert Fraser wrote:
>> 
>>> In a final release, unused things are signs of errors. When writing
>>> code, unused variables (perhaps they were used in a commented-out
>>> section?) are a dime a dozen.
>>> 
>> Yes, that's why I find the warning to be a nuisance, not a help.
>> 
> I have thought this issue more closely now about few hours.  I'll try
> write a more comprehensive answer to my home pages, but something now
> quickly thought;
> 
> * What is the purpose of the source code? There is probably lots of
> answers, but I will present you just one; the source code is aimed for
> human readers & writers.
> 
[...]
> I know that
> that sounds something humanists, but really - if the source is not
> meant to be understood by limited capability of humans, why the hell
> we are using (1) modular languages, (2) high level languages, (3)
> _indentation_, (4) __COMMENTS?!?__?!?
> 

counter point: perl/regex
counter counter point: smalltalk (I've never seen it, but I've been told...)

<g>

all (most?) programming languages are designed to be written (lisp?), some 
are designed to be read.

The purpose of a programming language is to tell the compiler what to do 
in a way that humans /can deal with/, saying nothing about how well.





More information about the Digitalmars-d mailing list