pybmy_giant wrote:Did it do us any harm?
I'd give a cautious "yes" to that. At the time I was learning BASIC nobody knew any different, but then modularisation, structured programming and information hiding became required methodologies. We had to learn them, and it was not as easy as it might have been had we learned to program like that from the start. There are still too many global variables in a great many programs; there are still too many cases where the implementation details of modules are intrinsic to the way they are used. Then came event-driven programming, Document-View and object orientation, which required a quantum shift in the way the programmer even thought
about an implementation.
With BBC BASIC you do have structured programming (more than C, and almost as much as Pascal), you do have event driven programming (Look at the WIMP Programming examples).
Re-implementing those BASIC programs took me back to my BBC Micro days, but not in a good way. I found myself looking at a line of code like
- Code: Select all
and thinking, "why is that not a named constant or even a string? Is the programmer supposed to remember the extents and bit-depth of thirty-odd modes?" I looked at code with REPEAT loops closed with UNTIL FALSE in an IF statement, and UNTIL TRUE elsewhere, and wondered how that distorts a student's understanding of structured programming. Yes it is the equivalent of BREAK and CONTINUE, but there is a conceptual difference.
Most languages have different aproches of implementing what the C derived languages tag as continue
As to screen mode handling how do you do it in C, C++, Assembly?
You would implement a set of defined constants for the functions that you use for changing the screen modes, correct? Do the same thing in BBC BASIC, nothing is stopping you. I am often frustrated at the over use of named constants in many languages, having to look through 100s of #define statements to find what the numaric value is can be very tedious (often needed when porting things).
I looked at this
- Code: Select all
and wondered how anyone could think that was a reasonable thing to put in a new-user tutorial. It was that tone more than anything else that horrified me about the tutorial as a whole; it assumed the whole mindset as it was in the 1980's when we did not know any better -- spaghetti code, magic numbers, obscure "clever" techniques, the whole works -- and yet it was published in 2009. The author's approach to programming was literally stuck 30 years in the past.
It is not an absolute beginners tutorial, this is for after you have alread a very good understanding of BBC BASIC.
It assumes structured programming (not speghetti code), and it is a lot simpler than the means of doing the same in most other HLLs. Lets see you do the same in C++ as simply as that on the bare OS (no extra libs). There ARE libs out there for BBC BASIC that simplify this even more, just like there are with C, C++, Charm, Pascal, Oberon, etc.
I have no strong feelings about using BASIC to teach programming, so long as it is done in a modern manner and teaches techniques that are not counter-productive. It is possible to use modern techniques in any language -- I've used OOP techniques in FORTH, which did not even have structures, let alone objects built-in -- and it is trivial to write good, modern, maintainable BASIC code that will teach students to produce code the way they will be required to in industry.
I would agree. What ever language is used can be good, so long as not to much is hidden from the very young students. BASIC is just one option.
But if those tutorials are indicative of the way BASIC will be taught then it will damage the students' education and I am against it.
On this one I strongly dissagree. If you do not think it is good to teach good structured, well maintainable modern programming skills then I do not understand what you want to teach.
pygmy_giant wrote:"BASIC - the best programming language ever?" - No - its er, basic.
Beginers All purpose
Symbolic Instruction Code. Well of course it is not the best it is Beginers
, though as to what is the best overall general purpose language, ask n programmers and you will have n^5th answers
.TO THE POINT OF THE THREAD:
if the correct dielect of BASIC is used it can encourage structured programming, and good habbits, with out removing to much from the control of the programmer to be usefull for teaching the very young.
There are many many options for a first language, each and every one has its pros and cons; I can not see BASIC being any more or less harmful than any other choice.
RISC OS, Giving the control of your computer to you.