In article <20071114023624.GE4057@[EMAIL PROTECTED]
>,
Robbert Haarman <comp.lang.misc@[EMAIL PROTECTED]
> wrote:
> [...] I don't know about you, but I feel programming is largely the
>automation of recurring tasks, with the purpose of reducing the amount
>of work we need to do. Imposing extra work on programmers on a language
>level, then, is a pity. [...]
Well, up to a point. "Clearly", if a task *is* recurring,
then [good] programmers should recognise this, and [good] languages
should enable this recurrence to be factored out [procedures, loops,
macros, file inclusion, ...]. But is not programming primarily the
expression of an algorithm [or similar] in a convenient but somewhat
formal language? Usually, this will be for execution by a computer,
but the same concept is also useful for human execution and for
didactic purposes.
Reducing the amount of work a programmer has to do is
*one* of the aims of a good language. Other may include clarity
of expression, efficiency of execution, bug resistance, ease of
translation [into m/c code or another HLL], ....
Type inference is just another of the aspects of HLLs that
is sometimes good, sometimes bad. It's good if it saves you work
without compromising the clarity and bug-resistance of the code;
it's bad if it merely reduces typing at the expense of these things.
The real danger is, of course, if the compiler thinks all is well
with your code and has inferred one collection of types, while you
intended some different collection of types; but how likely this
is will depend on other features of the HLL concerned.
To quite a large extent, however, this is a sterile debate.
If it *matters* to you whether [as per the title of this thread]
we write "int i" or "var i: int" or "var i" [type inferred], then
I think you almost certainly have worse problems with your programs
and your programming than these to contend with.
--
Andy Walker, School of MathSci., Univ. of Nott'm, UK.
anw@[EMAIL PROTECTED]


|