Re: OOP and memory management
From: Robert STRANDH (strandh_at_labri.fr)
Date: 07/04/04
- Next message: Nick Landsberg: "Stonemasons and Coders"
- Previous message: Universe: "Re: SoA Vs OO"
- In reply to: Paul Hsieh: "Re: OOP and memory management"
- Next in thread: Ben Measures: "Re: OOP and memory management"
- Reply: Ben Measures: "Re: OOP and memory management"
- Reply: Paul Hsieh: "Re: OOP and memory management"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 04 Jul 2004 07:05:51 +0200
qed@pobox.com (Paul Hsieh) writes:
> "Thomas G. Marshall" wrote:
> > Not talking about run time efficiency, I'm talking about the amount of time
> > it takes to create a project, and maintain it.
>
> Well on this very narrow point, what I am saying is that a compiler error that
> tells the programmer about an error before the program runs is better than a
> program that doesn't tell you about the error until it runs some specific
> scenario and there isn't necessarily a developer around to fix it.
While this might seem like an obvious statement, things are not quite
that simple. Obviously, if everything else stays the same, then it is
better to have errors caught at compile time than at runtime.
However, if the ability to catch errors at runtime influences other
aspects of the development process negatively, things are not
necessarily just positive.
As Thomas hinted, if the ability to catch some errors at compile time
influences the time it takes to create the project, you might be faced
with a situation of catching errors at compile time in a project that
will not finish on time, or that will be canceled from running out of
funding, whereas if you give up on that ability, you might finish the
project.
> Remember this is a narrow point -- and you can't weasle or talk your way
> around it. Run time dynamic type mismatches are for real in dynamically typed
> languages; they are very annoying and they don't exist in strongly typed
> languages.
Of course they exist, even in statically ("strongly") typed languages.
The fact that you cannot declare a variable of type "positive even
integer", and the existence of divide-by-zero runtime errors is proof
of the presence of type mismatches. In order for a type system to be
decidable, some approximations have to be made. The claim is that, in
order to be decidable, such approximations necessarily have a negative
impact on development time and, more generally, on the kind of correct
programs that can be expressed.
> You can be objective and realize this as the primary fundamental
> trade off or you can be blinded by typical language adherence fanatacism.
Of course it is a fundamental trade off, but the trade off is not
between catching all type errors at compile time, or not catching
them. The trade of is between on the one hand catching some type
errors at compile time at a the cost of not being able to express some
correct programs and of making development time longer, and on the
other hand of not catching some of those errors (that may not exist
anyway) in an expressive language that allows very rapid development.
-- Robert Strandh --------------------------------------------------------------------- Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp. ---------------------------------------------------------------------
- Next message: Nick Landsberg: "Stonemasons and Coders"
- Previous message: Universe: "Re: SoA Vs OO"
- In reply to: Paul Hsieh: "Re: OOP and memory management"
- Next in thread: Ben Measures: "Re: OOP and memory management"
- Reply: Ben Measures: "Re: OOP and memory management"
- Reply: Paul Hsieh: "Re: OOP and memory management"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|