Hello Markus. You say:
From the perspective of the programmer, there are two reasons why
I personally would like to see those type errors.
[Reminder : buggy variables which are not used, and don't generate any
typing errors]
Firstly, when developing source code, I often write helper functions
before using them. Code does not suddenly exist in its finished form, but
there is a process of creating it. Type errors for dead code are useful
in the process.
Secondly, it would be consistent with top-level function definitions.
Those are type checked, even if they are not used.
I expressed my pseudo-philosophical opinion, but I will never try to
quarrel with you (and with Rinus even less, God forbids). Your style is
a part of your personality...
Let me defend /myself/.
For quite a time I've been a laziness sectarian (and I taught Haskell
for a couple of years...) , and I conveyed to my students the basic
non-strict testing principle, which is a kind of "programming
Berkeleyism". Old George said 300 years ago: /"//*Esse est percipi aut
percipere*".
/
There is nothing wrong with testing/helper functions, also dummies
('bidon' as the French would say). But if you declare -- speaking about
humans -- that there is a process of creating the code, I reply that
lazy data are processes as well. They live in time (if at all), and for
me it is methodologically incongruous to permit them "not to exist at
all" (since not observed) if they are correct, and "exist partly"
(never instantiated but contradicting the type inference) otherwise.
Another literary analogy, Orwellian this time... Do you want the type
checker to behave as the Thought Police? It existed, and still exists.
But I believe that the principle of having to observe something in order
to assess it, is a sane one. I coded hundreds of throw-away programme
pieces, and I think that it wouldn't cost you more than a few seconds to
*use* your helpers, even if just to check them.
All the best, and thanks for interesting discussion.
Jerzy K.
PS. I am afraid your second argument is imperfect. The top-level
constructs are type-checked since the compiler cannot know whether a
module will be used or not.
/
/
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel
antivirus Avast.
https://www.avast.com/antivirus
_______________________________________________
clean-list mailing list
[email protected]
https://mailman.science.ru.nl/mailman/listinfo/clean-list