Next BIG improvement - Need Input before I Jump (New Features)

by Jim ⌂ @, Russell, KY, Monday, October 26, 2015, 23:46 (516 days ago)

Hello everybody,

I know that the forum is not very widely used but before I make a big change to BASIC256 I wanted some input and reasons to or not to.

I have noticed in my Introductory Programming class that the old BASIC string variable vs. numeric variable (a$ vs a) is causing students some grief. I have two possible solutions:

1) Change all variables (with or without $) into simple variants (they can store strings, integers, decimals, and booleans) without any fancy code. Just assign it a value and it becomes that type of variable. This would allow for the automatic conversion of one type to another with the automatic casting that is already happening. This would make BASIC256 act a bit more like scripting languages (like javaScript).

or

2) Require ALL Variables to be DIMed BEFORE USE with a type associated. Statements like "DIM a AS string" would be required for variables. This brings BASIC256 closer to VB.NET but adds quite a lot of complexity for the new programmer. Also this change would require rewriting ALL sample programs, documentation, and everything.

Currently I like option #1 the best. It simplifies much of the BASIC256 code and should allow for existing programs to continue to "mostly" run. It would require a significant update to the book but should make it easier also.

What do you all think?

Jim


Complete thread:

 RSS Feed of thread

powered by my little forum