One reader commented, "So should a basic language add object-oriented features? For me, it would simplify things. Inheritance and polymorphism produces much less code, and FOR ME, much more simplicity. However, for a procedure-oriented person, only complexity has been added."
This is an excellent point. One way that I've tried to add objects to Run BASIC is to have some built right in. You don't have to create them and you don't need to import them, but you can start using them. This is hopefully one way to begin to help procedural programmers warm up to objects and there's no reason why the rest of the program cannot be written in a procedural style.
The other thing that Run BASIC does is take the RUN statement and adapt it so that other BASIC programs that you run can be optionally treated as objects, or if that's too far of a leap you can think of it as a modular library of code, like so:
run "mymodule.bas", #module
#module doMyWork("some string")
Friday, November 21, 2008
Subscribe to:
Posts (Atom)