- Is Basic even that basic (anymore)?
Easy to learn or easy to use? These may be conflicting goals. which BasicLanguage will also make a difference
Basically, it depends on the BASIC interpreter. For example, Visual Basic is much more complicated and much more inconsistent than Smalltalk, Python, and even Java. Yet BASIC's reputation as a beginners' language means that people have the idea that it's the easiest language to use. Although BASIC (and interpreters alike) brings programming languages a step closer to true English (NaturalLanguageInterface
Well, complexity and ease are not corellated. Python is famously easy, and I would charge that the PythonLanguage
syntax is even more complicated than VbClassic
. The point is that both Python and VbClassic
use their complicated syntax to mimic an ambiguous conceptual ideal. VbClassic
loosely attempts to mimic human language, and Python attempts to mimic PseudoCode
. Compare v. SchemeLanguage
, which while it is incredibly powerful and simple, is also thoroughly opaque to many of the most experienced programmers.
BASIC Goto's were easy to relate to when I was a computer newbie. It is just like "go to step X" or "see page X" in recipes, tax forms, and books. Of course, getting hooked on Goto's is not a good long-term habit.
Universal IDE Interface
One thing that made Basic easy to learn was that the primitive IDE (editor, interpreter environment, etc.) was built into the language so that on a different machine one did not need to learn a new editing language/interface. See TeleType
examples. I once walked into a consumer electronics store as a teen and found out that the demo computer ran Basic. Without even knowing the brand
, I was able to edit in a goofy little program that said something like:, "You are stupid" over and over in a semi-random pattern. Or the quick-and-dirty way to scare 80's technophobes:
10 PRINT "This computer is about to explode, Run!"
20 GOTO 10
(Fortunately, this was before the TSA.)
XBasic? is a free language for Linux and Windows. Not an easy option, but then if it were easy would we learn it? Enjoy the challenge.
What would happen if Smalltalk were named Easy? (-- AnonymousDonor
Are you saying Smalltalk isn't friendly-sounding enough? If you want to look at intimidating names, look at Python. You and I know it's named after MontyPython
, but also remember that a python is a giant snake that coils around its victims and crushes them alive, and humans often have a fear of snakes regardless of size or venomosity. -- NickBensema
Python also is children's slang for disgusting in Sweden. "Det smakar pyton" == "It tastes disgusting".
Visual Basic is IMHO easier than all the languages you just mentioned. Smalltalk has weird precedence rules and its insistence on OO purism is a pain. Python is too finicky when it comes to formatting code, VB does it for you. Java - come on are you joking - how can you put that in with these others.
I could write a simple dialog quicker in VB than any of these other languages, which is a reflection of not just the language but the more productive environment. Have you seen the drag and drop capabilities in VB6 for doing database stuff? I'm sorry, but that kicks-***.
Basic has been pronounced dead, easy, outdated, lacking capabilities of other more sophisticated
languages since its earliest days (was it 1960? Dartmouth?) It must not be easy - In a recent visit to a Book Store with perhaps a thousand titles on programming languages, Visual Basic took up about 25-30% of the space on the shelf. It seems that at least BasicIsPopular?
whether it is easy or not. If it were easy, would you need 30- 1 1/2 inch thick books (and many more of lesser thickness) explaining how to use it? Perl had perhaps 4 or 5 books 3/4 to 1 inch thick. Python - maybe twice as many, Smalltalk - They must be hot items, I couldn't find a one. The reason for many languages of differing difficulty and ability is that all problems are not solved by any one language. The reason Basic has survived is because it has grown and extended through at least 5 or 6 iterations in the last 4 or 5 years. It has a wide user base, and you don't have to start all over again. I don't believe that any language is easy, or that any language is not needed, or that any language is the universal do everything the best language. But I do believe Basic in an evolved form will be around 20 years from now.
On the other hand: We were prototyping a personal information tool. I was just playing about with DolphinSmalltalk (and I was a beginner at both Smalltalk and Dolphin) but I was still getting stuff done at about twice the rate of someone else programming in VB. Simple things in VB were easy - but anything non-simple got a lot more difficult, it seems (this was VB5. I don't know much about VB). DolphinSmalltalk is a seriously good tool and environment for Windows development.
Simple things are easy in VB - and learning enough to do those simple things is easy, too. So in terms of effort needed to do something simple, starting from no knowledge, I think VisualBasic probably does win. I think some of the others probably take over pretty quickly after that, though.
I'll admit there are some inconsistencies in VB. If it were just the language and not the language+environment then you'd have a point.
The chief disadvantage of VB is that it is really tied to Microsoft Windows. And also has a limited lifespan in light of C# and .Net. (Although undoubtedly MS would never admit it and run the risk of annoying the several million VB programmers).
Doesn't bother me. I could switch to C# tomorrow and gain in the process.
- What is it about C# programmers and their insistence that VB is going away?
- Anyone with half a brain knows that VB and C# on .NET are virtually identical
- and you can do many things in either language. I just think the C# person who
- said the above should just get over it and get on with their lives. Is your self
- esteem really that low that you need to validate your choice for C# by consoling
- yourself with the fairy tale idea that VB is going to vanish anytime soon? -- EM.
- If you could switch tomorrow and gain, why don't you switch today?
A VB good point is the amount of stuff that integrates tightly with it. VB is a 2nd class COM citizen, whereas Perl, Python, and Smalltalk are (as far as I know) 3rd class (can only go through IDispatch). VB is still the only language where component level reuse is a reality (and has been for years).
I personally prefer C++ for larger projects because of the lack of code-level reuse mechanisms in VB i.e. no implementation inheritance and certainly no templates. (Although inheritance is coming with VB.Net)
I've taught programming courses to beginners in both C++ and VisualBasic
, and a number of students who had taken both courses thought VisualBasic
was easier and more fun.
No doubt, but I am afraid that is like saying that the K2 is shorter than the Mount Everest...
VB is still the only language where component level reuse is a reality?
Really? What about Delphi, C#, various Java implementations?
In the eight-bit days, BASIC was easy for simple tasks, though in most implementations it got more complicated when you had to use graphics or sound. CommodoreBasic
, for example, had no graphics commands, so the user had to resort to POKEs to get anything done. Yet, people used it not only for learning, but to program large applications, including BBSes, games, and financial software. That was because "easy" meant "easier than machine language", and because most computers came with BASIC.
Basic and visual basic are different things. The former can be easy without the latter being so.
But Visual Basic is also easier than machine language. And when it was released, it was monstrously easier than C++ using the Windows 3.1 API. It's only recent innovations that have leveled the playing field.
I learned APL in 1977. I only encountered Basic in 1984, when I bought a NEC "Trek" (Z-80, 1.2MHz, 16K RAM). Compared to APL, it was a cake-walk, however primitive. C-64 Basic was awful, though. (Programming the 64 using ML was great fun, in comparison.) Within a week of getting my first XT, I bought (paid for shrink-wrapped, as in) QB4.5.
What better way to learn how /not/ to program than to have an easy language, where all the pitfalls can be experienced, and most of them compensated for (within limits)? I'd suggest QB4.5 to anybody who wanted to dive into the shallow end of the pool.
p.s. I learned VB5 in under a week ... a truly ghastly experience.
BASIC is just great for small utilities and personal projects. It isn't well suited for large systems. The early BASICs actually shared one nice aspect with Smalltalk (yes really!) which was their interactivity. You could build a program a line at a time, playing with the code as you went. You could try something out at the command line without adding any code to the program. You could stop a program (or get stopped by an error), look around inside and change values, and then resume execution where you wanted.
I came across some of my early BASIC programs the other day. I had played with various flavors of BASIC on a time share system, the AppleTwo
computer, the PdpEleven?
, the IMSAI-8080 CPM system and GWBASIC on DOS. The code I found was uniformly horrible (actually, more horrible the larger the program), in my mind through no fault of my own, but due to the BrainDamaged?
line numbering system all these BASICs used. I wonder how much more quickly I would have advanced had these resource-constrained systems used something more structured and expressive yet equally interactive and compact, such as LispLanguage
PSET (160, 100), 255
A white dot in the middle of the screen! From there, it is just a few more lines to go to create cool graphical things. As a newbie, it was the graphical things I fancied, and QBasic made it easy to create small games and stuff. If I would have had to start programming in C and had to create stupid Fibonacci functions and programs that convert decimal to binary, I wouldn't have liked programming. Unfortunately, that is how institutions teach programming. If it isn't fun, you don't learn. Most people do not think it is fun to do Fibonacci functions and therefore does not learn programming. But with (Q)Basic it is very easy to do fun stuff (graphical things), therefore you learn.
Yeah, I still occasionally plug my speccy into my TV and make starfields and suchlike. Yes, I learnt to program on a Speccy, even though 32-bit Windows had already arrived on the scene (though I was still using Windows 3.1 at home). I admit, however, that they were ghastly to program. And now my YUIOP keys don't work.
This seems more about teaching methodology than about language. Graphical API's could be supplied to C also. However, I do question C as a first language.
It's a mixture of ease of concepts and results more than just that it can make something fun that does make BASIC a good (though habit-forming) starting language. If you consider that java often does start out with graphical implimentations when it's being taught, but many people seem to find it too daunting as a begining language because it has a degree of complexity.
I would certainly say that BASIC is an easy language to learn - I learned to program in it when I was 5. It teaches you to write SpaghettiCode
- I had a simular experience, but ApplesoftBasic? (the dialect I learnt) also taught me to avoid SpaghettiCode. I quickly became overwhelmed by the spaghetti, had to develop a more procedural style (before I ever heard about function or subroutines). -- JimmyCerra
What can I say? Basic was probably the first programming language I ever did any programming in. And now? Well, I've grown into several other languages. What I can say is that Basic as a first language was great. I would never have got on with Smalltalk or C++ as my first languages.
Considering what I know now, I'm sometimes quite shocked to consider that I'm still programming basic on a C64. But why do I do it? Put simply.... because I like it. And it allows me to do things that would be quite complex in other languages.
Other than that, what can I say? I'm a true nostalgic at heart, and don't want to forget my roots. Let's hope that BASIC will be spoken of, for whatever reason, long into the future.
Also consider splitting into two pages. First one would be called WasBasicEasy?
, because you can't find old-school BASIC outside thrift stores anymore, and second one would be called IsVisualBasicEasy?
, addressing the most popular BASIC interpreter of this decade.
- Actually, the thing that made BASIC easy was probably that it was bundled into the OS of most 8-bit computers. If Woz had instead put ForthLanguage into the Apple II's ROM, millions of hobbyists and children would have learned to program Forth first. I often think that's how I would try to change history if I had a time machine. -- NickBensema
- (anon: although it would also have helped to rename "Forth" to "First")
- You and me both, brother. (And see also CanonCat, JupiterAce.)--IanOsgood
Of course it is easy, and alive and well...
Search for BaCon
What made old BASIC easy was that it was simple and direct. Considered harmful or not, there is no flow control simpler or more direct than telling the computer where to go next. It even maps directly to a machine instruction. Graphics were also simple and direct. You just asked for a screen with the desired dimensions and told the computer to 'poke this pixel (or character) to these coordinates'. Again, it mapped directly to a couple of ASM instructions. The editor/interpreter was all that there was - the entire toolset and dependency chain. With that sort of simplicity and directness, you could learn the language and some basic programming concepts and be coding in no time.
Now, we have layers upon layers of indirection and complexity. You have to learn a language, its idioms, tools, dependencies, libraries, frameworks, common patterns, class hierarchies, compatibility issues, and how to tell boilerplate from getting-stuff-done code. Flow control requires understanding different structures, event-driven and procedural styles, exceptions, concurrency, aspects and hooks, how VMs execute things and frameworks dispatch them, etc. To do simple graphics requires understanding an O/S, GUI framework, window handles, device contexts, rendering engines, graphics libraries, class hierarchies of brushes and patterns, different types of bitmap and canvas, etc. And of course, at least basically being able to understand all of the different architectures, techniques, and design concepts used by the developers of the many layers of indirection and how the parts interact.
So old BASIC really was easy by comparison. But what would it be good for nowadays? As a teaching language, it doesn't teach you about any of that tough stuff that comes from all the indirection.