|
-
Jun 3rd, 2023, 08:02 PM
#11
Re: TwinBasic
 Originally Posted by Niya
and it tickles me somewhere deep in my soul.
Since the topic of pointers in TwinBASIC came up, I've been trying to figure out where this itch about it really came from. I just remembered, it's about VarPtr. An impression was made on me long before VB6 came onto the scene. BASIC has always had wizards like the trick who could work black magic in the language. When us mortals needed to do something really exceptional in the early days of Visual Basic, we'd very to often end up with finding code written by one of these gods. A curious undocumented function came up quite a bit. It was called VarPtr. It wasn't like it is today. It was undocumented so you couldn't really find official documentation on it and you had to import it from the runtime itself using a declare statement.
Every time it came up it was always accompanied by warnings about how dangerous it was and how it should not never be used unless you absolutely know what you're doing. They made sure we understood why it was undocumented and made us very scared of it. Now in those days, I hadn't really learn about pointers or how ABIs and memory worked or any of that more advanced low-level stuff so you can imagine this left an impression on me.
VarPtr was never meant to be a part of Visual Basic. My guess is that it became more and more popular over the years until MS just gave in and put it in the language when VB6 came around. Microsoft always intended for Visual Basic to be a safe language. I guess this is why it's weird to me for TwinBASIC to have first class pointers because I learned back then that this was never a direction Microsoft wanted to go with the language. Since that time I have always understood why BASIC is the way it is, I just forgot where it started.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|