Re: Pointers to "why C behaves like that ?"

"Peter Flass" <peter_flass@yahoo.com>
26 Nov 2002 22:09:49 -0500

          From comp.compilers

Related articles
[38 earlier articles]
Re: Pointers to "why C behaves like that ?" david.thompson1@worldnet.att.net (David Thompson) (2002-11-26)
Re: Pointers to "why C behaves like that ?" ajo@andrew.cmu.edu (Arthur J. O'Dwyer) (2002-11-26)
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-26)
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-26)
Re: Pointers to "why C behaves like that ?" Nicola.Musatti@ObjectWay.it (Nicola Musatti) (2002-11-26)
Re: Pointers to "why C behaves like that ?" nmm1@cus.cam.ac.uk (Nick Maclaren) (2002-11-26)
Re: Pointers to "why C behaves like that ?" peter_flass@yahoo.com (Peter Flass) (2002-11-26)
Re: Pointers to "why C behaves like that ?" fjh@students.cs.mu.OZ.AU (Fergus Henderson) (2002-11-26)
Re: Pointers to "why C behaves like that ?" daniel_yokomiso@softhome.net (Daniel Yokomiso) (2002-11-26)
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-26)
Re: Pointers to "why C behaves like that ?" vugluskr@unicorn.math.spbu.ru (Roman Shaposhnick) (2002-11-26)
Re: Pointers to "why C behaves like that ?" vugluskr@unicorn.math.spbu.ru (Roman Shaposhnick) (2002-11-26)
Re: Pointers to "why C behaves like that ?" vugluskr@unicorn.math.spbu.ru (Roman Shaposhnick) (2002-11-26)
[22 later articles]
| List of all articles for this month |

From: "Peter Flass" <peter_flass@yahoo.com>
Newsgroups: comp.compilers
Date: 26 Nov 2002 22:09:49 -0500
Organization: Road Runner
References: 02-11-059 02-11-083 02-11-100 02-11-109 02-11-135 02-11-142
Keywords: types, design
Posted-Date: 26 Nov 2002 22:09:49 EST

This strikes me as as much of a maintenance headache as any of the
other possibilities. Try to use the variable before the "let" and
you've got an error. Might as well declare the variable separately
from referencing it and be done with it, even if you don't (or don't
have to) declare any attributes.


thp@cs.ucr.edu wrote:
> There is still the argument that a typo might create a new variable
> instead of a syntax error, e.g.:
>
> fumds = funds + income;
>
> but, unless the typo is repeated, e.g.:
>
> funds = fumds - expenditures;
>
> the typo will produce an unused-variable warning. To insure against
> such repeated typos, the language can require a keyword to accompany
> the introduction of a new variable, e.g.:
>
> let profit = income - expenditures;
>
> In such a case the first typo above would produce a syntax error.



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.