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

"Nicola Musatti" <nicola.musatti@objectway.it>
24 Nov 2002 01:22:00 -0500

          From comp.compilers

Related articles
[17 earlier articles]
Re: Pointers to "why C behaves like that ?" md9slj@mdstud.chalmers.se (Stefan Ljungstrand) (2002-11-20)
Re: Pointers to "why C behaves like that ?" torbenm@diku.dk (Torben Ęgidius Mogensen) (2002-11-24)
Re: Pointers to "why C behaves like that ?" torbenm@diku.dk (Torben Ęgidius Mogensen) (2002-11-24)
Re: Pointers to "why C behaves like that ?" nmm1@cus.cam.ac.uk (Nick Maclaren) (2002-11-24)
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-24)
Re: Pointers to "why C behaves like that ?" jacob@jacob.remcomp.fr (jacob navia) (2002-11-24)
Re: Pointers to "why C behaves like that ?" nicola.musatti@objectway.it (Nicola Musatti) (2002-11-24)
Re: Pointers to "why C behaves like that ?" fjh@cs.mu.OZ.AU (Fergus Henderson) (2002-11-24)
Re: Pointers to "why C behaves like that ?" anw@merlot.uucp (Dr A. N. Walker) (2002-11-24)
Re: Pointers to "why C behaves like that ?" whopkins@alpha2.csd.uwm.edu (Mark) (2002-11-24)
Re: Pointers to "why C behaves like that ?" whopkins@alpha2.csd.uwm.edu (Mark) (2002-11-24)
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-24)
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-24)
[43 later articles]
| List of all articles for this month |

From: "Nicola Musatti" <nicola.musatti@objectway.it>
Newsgroups: comp.compilers
Date: 24 Nov 2002 01:22:00 -0500
Organization: Mailgate.ORG Server - http://www.Mailgate.ORG
References: 02-11-059 02-11-087 02-11-089
Keywords: types, design
Posted-Date: 24 Nov 2002 01:22:00 EST

"Christian Bau" <christian.bau@freeserve.co.uk> wrote in message
[...]
> So a language that allows you to drop declarations lets you save five
> seconds because you don't have to type "long" or "int" or whatever in
> two places, and then it costs you three hours to find the bug.
>
> It is much better if I can specify redundantly what the code is
> supposed to do; that makes it more self-documenting and it is more
> likely that the code doesn't compile if I make mistakes.


I think a distinction should be made between languages with static
typing and languages with dynamic typing.


For languages with static typing and implicit declarations I entirely
agree with your comment. On the other hand languages with dynamic typing
allow a degree of generic programming that seems to make a big
difference. Proponents of languages such as Python argue that static,
explicit typing requires from you a lot of effort in exchange for a
false sense of security: no program is correct just because it compiles
cleanly. The time you save can be devoted to increasing the extent and
coverage of your
testing.


I must say that I still very much enjoy that "false sense of security"
and prefer programming in a statically typed language with explicit
declarations. However I do consider the argument reasonable.


Cheers,
Nicola Musatti


Post a followup to this message

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