TIP: Click on subject to list as thread! ANSI
echo: pascal
to: DAVID CHORD
from: MIKE COPELAND
date: 1998-04-18 14:11:00
subject: Entering Passwords

 DC> However, where is the problem with break, and how can you do a better
 DC> or as good as job without using it?
   It's (quite) possible to not realize where the Break will "break to",
whether it'll skip other statements or exit from a whole code block.  If
one doesn't have a lot of experience and care with personal style
consistency (e.g. sloppy or spaghetti code), it's easy enough to miss
what the compiler will actually execute or assume that something will be
executed which won't...
   "Doing a better job without it"?  That's awfully hard to state, since
such things are so style-dependant.  Myself, I've never used a Break or
Continue (or GoTo) in Pascal, and I just _know_ I don't need them to be
a better Pascal programmer.  They might be a _convenience_ to someone
who doesn't know Pascal well enough to use it as it was designed (and
who's dependant on a background of a non-structured, undisciplined
language like COBOL, BASIC, or even assembler), but once you learn and
completely accept Pascal for what it is and is intended to be, you'll
never use these things - because they're chances for errors/problems
which don't occur in the "native pascal" language.
   These things were added to the 7.0 versions of TP/BP, I believe, to
make Pascal more attractive to programmers of other languages Borland
was trying to "steal away".  Most experienced Pascal programmers didn't
want these additions, and very few use any of them, as much as I have
ever seen.
 DC> It's all very nice to teach someone that something is the ultimate
 DC> evil, but it does not make you a good teacher. In fact, if you don't
 DC> try to show them an alternative method or even give them clues and let
 DC> them learn by experience, you are virtually useless as a teacher, at
 DC> least in that regard.
   Not at all.  Many (of my former students) came into my Pascal classes
with (some) experience in other languages which needed such things.
Whereas I always tried to (re)teach these people the Pascal (right) way
of using the language, I always had some diehards who insisted on using
GoTos (all that was available at the time), and I had to impose
penalties on them to force them to understand and use Pascal the right
way.  The fact is, _not_ using these unstructured constructs _is_ the
better way, but _proving_ it to some can only be done by letting them
make the mistakes over and over, falling farther and farther behind as
they take longer to "get it right", until they eventually "get
religion" and see what was originally meant.  Hardly easy to do, but
sometimes the only way...
 DC> Note that I do appreciate your efforts and what you have taught me or
 DC> made available to me and others over the last 5 years or so. But it
 DC> does annoy me a lot when someone with more experience says 'You can't
 DC> do that, it's the wrong way to do it and you'll have serious
 DC> problems!' then walks off without offering a hint of a better/correct
 DC> way of doing it. 
   Fair enough, but you've got to realize the limitations of this
medium, where I can't expend a lot of time or effort to explain certain
details, experiences, or factors which are behind things I say.  I've
tried to do some of that here, but it's unreasonable to think everyone
will read all this dialog, or understand/believe it - sometimes it's
best to say, "It's wrong, do it another way.", and let the person try
the different way (or not) and eventually find out.  Many of these
concepts are subtle and experience-based, and not something which can
shown simply or caught with syntax checking.
... As I said before, I do not repeat myself.
--- OMX/Blue Wave/DOS v2.20
---------------
* Origin: Mike's Place (1:114/307.0)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.