5 ms·
> It wasn't that easy to understand Out of all the complaints I've seen about BASIC/Visual Basic, this has never been one of them.
by Sohcahtoa82 4y ago
> It wasn't that easy to understand
Out of all the complaints I've seen about BASIC/Visual Basic, this has never been one of them.
- Mizoguchi 4y agoReading and debugging code filled with gotos can be a real nightmare.
- Sohcahtoa82 4y agoLater dialects of BASIC had code blocks and functions, making GOTO unnecessary. If you were using GOTO in your BASIC code in the 90s, you were doing it wrong.
- skeeter2020 4y agoOK, then what about "On Error Resume Next"? ;)
- ipaddr 4y agotry / catch replaces that today
- Sohcahtoa82 4y agotry / catch is almost he opposite of On Error Resume Next OERN would make it so uncaught errors were silently ignored and execution would just continue on the next line as if nothing wrong happened. This would likely result in more errors, which would then also be ignored.
- ptx 4y agoFrustratingly, the "on error goto" mechanism in Visual Basic is basically try/catch, except that the error object doesn't give you any kind of stack trace (not even the procedure or line number where the error occurred) so you have to constantly catch and rethrow errors just to add context information.
- Sohcahtoa82 4y agoThe absolute smelliest of code smells.
- pcdoodle 4y agoChad move. Something broke but we still moving to the next line.
- bioemerl 4y agoIt's easy for a programming language. However, if someone is going to learn, I'll bet they'll pick up python in a similar amount of time, and get a lot better tools when they do it.
- Sohcahtoa82 4y agoWell yeah, but remember the context here. We're not talking about programming languages today. BASIC was invented in 1963 and exploded in popularity in the late 70s. Python 1.0 didn't come out until 1991.
- radlad 4y agoBut we are talking about programming languages today. The article in question is "Nostalgic for VB? BASIC is anything but dead." The article details alternatives you can run today, such as FreeBASIC. The commenter you're replying to argues that BASIC no longer has the advantages it had in 1963, which are unrelated to the language syntax, and that Python offers a closer alternative in that it makes programming accessible.
- ipaddr 4y agoInvisible spaces and/or tabs are important in Python which makes it more difficult.
- ghaff 4y agoYeah, but that's the sort of thing you more or less learn about on the first day and a decent editor/IDE mostly removes it as an obstacle.
- chowells 4y agoIf they're invisible, your text editor is doing something very wrong. They cause a fixed amount of blank space that otherwise would not be present. That is very visible.
- skeeter2020 4y agoBASIC is very verbose and diluted syntax. This makes it great when you're coming from say English as your language, but it makes absorbing a larger system slower and and harder IME. It also jumps through some hoops to accomplish lower-level or peripheral tasks, which makes understanding what is actually happening at a conceptual level more difficult. So I think the correct level of "UNDERSTAND" needs to be considered.
- ptx 4y agoIf Visual Basic is supposed to be for beginners, it's surprisingly complicated. It has both value types and reference types and both can be passed either by reference or value, giving four ways of passing parameters compared to Python's one way. It has both early and late binding, compared to Python which again has only one kind. It has "default properties" on objects, which lets you sometimes use some objects directly in place of some of their properties but sometimes not. It has different syntax for function calls in expressions and statements, combined with a completely redundant third way (the "call" statement) that confuses matters further. And in addition to being both statically and dynamically typed (with "Object" declarations) it's also both strictly and loosely typed (with Variant values).
- mynameisvlad 4y agoIt was also created 16 years before the first version of Python, 36 years before Python2. It was written in time with completely different paradigms and the two languages weren't even built with the same design considerations in mind. Obviously, newer languages are going to tend to be easier to work with for beginners, that should be a given. We've made massive improvements in the field in the last few decades.
- quietbritishjim 4y ago> Obviously, newer languages are going to tend to be easier to work with for beginners, that should be a given. The whole point of this comment chain is to discuss whether BASIC was easy to use so it's clearly not a given.
- mynameisvlad 4y agoHow does BASIC being easy to use or not have anything to do with newer languages being easier to use? Newer languages have the benefit of hindsight and rapidly improved technology. Better graphics, more power, fewer of the heavy limitations that came with early technology. Between the time that BASIC and Python first came out, we went from System/360 mainframes to Windows 3.0 on our home desktops. Obviously newer languages are going to be able to take advantage of this increased power and wider abilities of computers. It should be plainly obvious to anyone who takes more than a second to think about it.
- DrJokepu 4y agoNo, I get what they're saying, especially with older dialects such as C64 BASIC. It may be approachable to beginners, but the thought of trying to maintain software written in it isn't incredibly pleasant. On the C64, I find even 6510 / 6502 assembly to be easier to follow than C64 BASIC.
- actionfromafar 4y agoOn all these 8-bit platforms, you could only do so much until RAM was full. So there was a built in escape hatch for complexity.
- ambyra 4y agoI noticed basic is simple and easy to read if you don't try to add structure to your program. As soon as you start messing with functions, arrays, variable types, it all becomes a mess.