How BASIC is FreeBASIC?

General discussion for topics related to the FreeBASIC project or its community.
Tiger
Posts: 29
Joined: Jul 10, 2008 17:48

How BASIC is FreeBASIC?

Post by Tiger »

BASIC was meant to be for beginners with no prior knowledge - and FreeBASIC is not.

This is not a complaint. FreeBASIC is great. I really think that.

And yet, if Kemeny and Kurtz had wanted a modern language they could have simply stuck with FORTRAN. They saw, however, that there are millions of people out there who are able and willing to program computers, if only the access was easier and clearer.

The name FreeBASIC implies that it follows this spirit, but I fear it has crossed this line some time ago. Throwing out GOSUB is one example. GOSUB can be understood and used in a second, SUB cannot. Having to use DIM before being able to use variables is another.

As I see it and observed it myself, FreeBASIC doesn't provide the inital success to newcomers that made BASIC a language "for millions of people".

Once again. This is not a complaint! FreeBASIC is a wonderful compiler. If you have decided to let FreeBASIC use a modern language this is absolutely fine. Hey, after all it's your language.

But you went public and many people did read or will read the name and the description and expect to get a BASIC and then they will be disappointed because they got something else.

Therefore, wouldn't it be fair to make clear to those who are interested, that while it is a very modern and extremely powerful language, it is not the next Beginners All-Purpose Instruction Code?

Personally I find this "burning of the bridges" a bit deplorable, because there is actually no Beginners-All-Purpose-Code at the moment at all and I had admittedly hoped FreeBASIC could kindle something in that direction as the original BASIC did.

I really feel torn apart at the moment between investing more time rewriting old programs and thus getting deeper into FreeBASIC or "just get over with it" as someone said and move on.

This is just my opinion, of course.

Best regards

Tiger
DOS386
Posts: 798
Joined: Jul 02, 2005 20:55

Post by DOS386 »

Throwing out GOSUB is one example. GOSUB can be understood and used in a second, SUB cannot. Having to use DIM before being able to use variables is another.

Code: Select all

FB BLAH.BAS -lang qb
;-)
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

I love the direction of FreeBASIC. Personally, I would like to see it focus 100% on -lang fb and get rid of all the legacy -qb, etc... substraints. This is 2008, no need to live in the past. QB had its time to shine and now let's just remember it with fond memories and let it die a peaceful death once and for all. There are plenty of other BASIC's and BASIC variants that can fill the QB gap - FreeBASIC need not be one of them. I know FB was originally made and marketed as a QB clone type of language, but there is no need to cling to that idea forever - it is limiting and disfunctional for the long term growth of the compiler. Times change. With the few developer resources available for FB, concentrating on -lang fb would be much easier and productive in the long run.

Having said that, GOSUB is still useful and it would be nice to still have it. Having to DIM variables has saved me from many hard to find errors countless times.
nkk_kan
Posts: 209
Joined: May 18, 2007 13:01
Location: India
Contact:

Post by nkk_kan »

Another Flame-war-starter post! :)

It's still as simple as Qbasic.
Get over it...FreeBASIC is still simpler than most of the languages

Actually, Declaring variable is for programmer's own good..
It avoids some errors and logical faults..

Gosub can be easily replaced by making a Sub and calling it
I dont see why people still bother with Gosub.

And Most other languages are harder than FreeBASIC..
IMO, FreeBASIC is an intermediate between Qbasic and Other Languages.
If you really want simple code, go program in Qbasic and then come to FreeBASIC.

And We do have a 95% (or more) compatible version of FreeBASIC (0.15 i think)
I really feel torn apart at the moment between investing more time rewriting old programs and thus getting deeper into FreeBASIC or "just get over with it" as someone said and move on.
Everything should change with time i guess. So Why not code?

But as you say..it's your opinion. I don't exactly agree with you though.
Crono_R
Posts: 9
Joined: Mar 20, 2008 0:16

Re: How BASIC is FreeBASIC?

Post by Crono_R »

Tiger wrote:BASIC was meant to be for beginners with no prior knowledge - and FreeBASIC is not.

...blabla...

The name FreeBASIC implies that it follows this spirit, but I fear it has crossed this line some time ago. Throwing out GOSUB is one example. GOSUB can be understood and used in a second, SUB cannot. Having to use DIM before being able to use variables is another.

...blabla.
Would a beginner, beginning in Freebasic even know about Gosub or the possibilty of other languages that don't need declarations?
I think this way a beginner gets a better start because he/she's forced to code cleaner when learning programming for the first time.
Sisophon2001
Posts: 1706
Joined: May 27, 2005 6:34
Location: Cambodia, Thailand, Lao, Ireland etc.
Contact:

Post by Sisophon2001 »

In 1991 Ethan Winer publisher BASIC Techniques and Utilities, and for me this pushed BASIC beyond the reach of beginners. It showed how to mix assembly language with basic, and for a while I remember basic programmers labelling assembly language "as easy as basic". FreeBASIC stems from this root, and it seems logical that it should grow into a modern language. This is what I want to see, a continue growth of FB.

That said you do have friends like CoderJeff who are working hard at compatibility with the old style language. All you need to do is try the -lang qb option as DOS386 pointed out.

I don't believe that you can force the direction of an open source project, or assume that developers would still contribute if it was not going in the direction they liked, but you can encourage them by giving positive feedback in the areas you are interested in.

Garvan
jevans4949
Posts: 1186
Joined: May 08, 2006 21:58
Location: Crewe, England

Post by jevans4949 »

As somebody whose second programming language WAS Dartmouth Basic - yes, Tiger, FreeBasic is nothing like it. But then the rot actually started with QBasic, which was nothing like GWBasic. FB is modelled on QB.

Our documentation does tend to major on the QB-type syntax, but (I just tried it), lang -qb DOES support the original syntax.

Code: Select all

10 input "what is your name"; n$
15 if n$="" then 40
20 print "Hello, ";n$
30 goto 10
40 print "bye"
50 end
Tiger
Posts: 29
Joined: Jul 10, 2008 17:48

FreeBASIC, BASIC, GOSUB, answers

Post by Tiger »

Thank you for all your answers.

DOS386, thank you, I did RTM of course. Actually, I don't really need compatibility to QB, as I don't mind to rewrite my old programs in principle. Doing so can only make their quality better. ;-)

When I got into contact with FreeBASIC it gave me the impression that it would lead the beginner from the start to possibly 3D. I am sure FreeBASIC would have the capacity to perform this. I think this could be incredibly attractive especially to young people and thus for teachers, too.

FB BLUB.BAS - lang qb is definitely a nice nod to the past, but no real solution for beginners.


PaulSquire, I too love the direction of FreeBASIC. It is just that there are loads of good! old BASIC programs that are suitable for beginners and waiting to be revived. David Ahl f.e.

As the developers decided to go with the syntax of BASIC, it would be nice if it was possible to use the old programs with as little rewriting as possible and then build on them slowly without having to switch between different versions. From ASCII-Wumpus to Wumpus-3D so to speak.

Concerning DIM: It is difficult enough to explain a beginner what a variable does. Having to introduce DIM at the same time doesn't make it easier. I do not doubt the use of it, naturally!


nkk_kan, when I wrote "burning" and "kindle" it was not my intention to start a flame war. ;-) And I know GOSUB can be replaced. GOTO could probably be replaced, too. But that is not the point. It is about making the access to a language as easy as possible.

"And Most other languages are harder than FreeBASIC..." I totally agree!! And how many of those people who own a computer are actually programming? Hardly anyone. Exactly because of what you said. And that is were the spirit of BASIC comes in.
And would you really advice anyone to start with QBasic? :-) I think not.


Crono_R, no, I believe a beginner will open a text file, write a BASIC code that he found on the internet or in an old BASIC book, start it with the FB compiler - and it will not work. Then he will try the same with FBEdit and it won't work either. If he is really stubborn, he will have a short look in the help file, then give up and move to Python and become a brilliant Python programmer. No trouble then with any SUBs at all. :-)

No, seriously: I don't think a beginner will get a better start if you try to force him (or her) into anything right from the start or tell him to RTM. He will give up, especially, if he is trying it alone.

Tiger
Last edited by Tiger on Jul 14, 2008 8:10, edited 2 times in total.
Tiger
Posts: 29
Joined: Jul 10, 2008 17:48

Post by Tiger »

Sisophon2001

-lang qb is about compatibility, my post is about making the start in -lang fb as a very first language as easy as possible to attract a bigger crowd.

I do not believe in forcing anybody into anything at all. This is not the intention of any of my posts. The question for me is rather, will FB remain a niche language like so many other good languages and is that the intention of the developers. This would be absolutely OK, of course! But then there is no real need to write verbose beginners' tutorials, like some helpful people did here already.


jevans4949

thank you for trying that out with line numbers. I didn't even dare to do that.

You learnt Dartmouth Basic? That's great. Well, back then the instructions fitted on a few pages, examples included. The possibilities in the graphical department were a bit limited though.

Yes, I know it started with QBasic. On the other hand you could upgrade to QuickBasic if you wanted to spend that money. I still find the idea of using BASIC with a compiler extremely attractive and I think it is one of the major advantages of FB over other higher languages.

Is it really so impossible to keep at least the classic syntax? The line numbers - as outdated as they are - are very useful if you try to explain somebody how computers think. I am not sure if I would miss REM which I used once or twice and LET which I only heard of from hearsay.

Tiger


@ moderator

Did you change my naughty version of "RTM"? Sorry for that then; it was meant in a humorous way only.
jofers
Posts: 1525
Joined: May 27, 2005 17:18

Post by jofers »

I think it's a legitimate question. BASIC is meant to provide an english-centric programming language, which is why we can call "open for random access read" instead of "fopen("", "r+")".

FreeBASIC provides a 32-bit compiler with this syntax, and provides old school compatibility not just with -lang qb but also with -lang fblite. fblite gives you both new features and compatibility, it's essentially the "safe" modernization path, while fb is the backwards-incompatible one.

Sometimes when adding new features the original focus is overlooked. Pointers, for example are no more easier on FB than with C. However, the developers are really trying to create a language that is easy to pick up and has modern features.

Even python has dropped ambiguity features in its latest version to allow more advanced features and faster code. I forget, but I think it had something to do with implicit output commands. That's inevitable. FreeBASIC is compatible with a lot of Visual Basic code, and much work is done to maintain that. But to maintain 100% compatibility with both a language dialect from 1985 and a language dialect from 2002 is impossible.
nkk_kan
Posts: 209
Joined: May 18, 2007 13:01
Location: India
Contact:

Post by nkk_kan »

nkk_kan, when I wrote "burning" and "kindle" it was not my intention to start a flame war.
You didn't get my point. Such Posts generally turns into a flame-war ;)
And would you really advice someone to start with QBasic? :-) I think not.
There you go!
As we progress further and further, technology becomes better and better.
FreeBASIC is no exception, it is improved version of QB (honestly, i don't even think we should compare it to QB..)
Let me give you an example, back in old days, Steam was used to run railways. Now, it uses electricity (or magnetic fields). And that is better.
Similarly, Qbasic also needed some improvements..(Like Windows/Linux support, Declaring Of variables, Faster execution, Multiple thread programming etc.etc.). I'd stand by my point that FreeBASIC is hardly what you may call "hard to learn" language or anything. Funny thing is that i never heard any beginners complaining about Declaring stuff =]
yetifoot
Posts: 1710
Joined: Sep 11, 2005 7:08
Location: England
Contact:

Post by yetifoot »

If you want an 'official' BASIC of the lineage of Kemeny and Kurtz/Dartmouth, then you could try TrueBASIC, their new version.

http://www.truebasic.com/
Tiger
Posts: 29
Joined: Jul 10, 2008 17:48

Post by Tiger »

jofers, -lang fblite doesn't seem to support GOSUB or line numbers. I understand that it is meant for the QB coders, not for BASIC beginners in principle.

I can't quite follow you on your last argument. VB 6 did allow Gosub and line numbers. I must admit I don't have the knowledge in how far backwards compatibility is possible in a modern compiler and what the tradeoff would be.

What is actually gained in return when you leave out GOSUB and line numbers? Is it just speed? Or is it about being compatible to something else? I really don't know.


nkk_kan, I know what you mean and I am fully aware that FreeBASIC is an improvement. That is what makes it attractive. However, if the price is that programming beginners are left behind, then it is still a good language, but it is not a beginners language anymore. And I think paying attention to them now could pay off in the future a lot.


yetifoot, thank you very much, but I consider FreeBASIC for several reasons to be more attractive in the long run.

In any case, it is interesting in what fields TrueBASIC differs from the Dartmouth dialect, i.e. where Kurtz has changed his original ideas. I was tempted to apply for their beta stage, but I don't really have time for that. So much to discover, so little time.


jevans4949, in case this is of interest to you: an original Dartmouth BASIC manual can be found here (ca. 2 MB): http://www.bitsavers.org/pdf/dartmouth/BASIC_Oct64.pdf


To all, I am aware that similar discussions have taken place before in this forum, but as far as I know not from the viewpoint of programming learners, although some of you mentioned it in single posts. It is certainly not my intention to spam this forum, and I wouldn't have posted it, if I wouldn't believe in the potential of FreeBASIC.

I just have the feeling that FreeBASIC is in danger of leaving absolute beginners behind and thus becoming one of many brilliant languages nobody knows, except the little crowd of stout followers.

I think FB could be very attractive to beginners as a language if it is possible to combine the easyiness of BASIC with the power of a modern language.

Someone who starts with FB now, even if he or she has no prior knowledge, might be an active contributor in two or three years. Frank Dodd's Irrlicht wrapper alone could IMO be an argument to change to FB for some people.

Well, at least I wanted to have shared my thoughts about that with you. It is night now in this part of the world, so thanks for listening to me and not flaming me. ;)

Good night.

Tiger
Last edited by Tiger on Jul 14, 2008 8:40, edited 3 times in total.
Hexadecimal Dude!
Posts: 360
Joined: Jun 07, 2005 20:59
Location: england, somewhere around the middle
Contact:

Post by Hexadecimal Dude! »

Imo FreeBASIC is much easier than QB, my evidence for this is that I suck a lot at QB, and I suck much less at FB, even though I started learning QB first.

I agree that forcing beginners into best practice isn't constructive, and that people shouldn't be forced to do "magic" just "because it's what you do" (which is explained much later as effective for modularisation or to be in line with some other design principle), but I don't think FB is like this.

Infact, I find it more logical that we have to name our variables before we use them, and that subs should not see other parts of the program. Actually, I think FB's quirky file and graphics functions are the biggest barrier for beginners-- not only can you not arrive at them by logically applying language rules you've already learned... you can't arrive at them logically even after learning the whole language! - they are simply magic which is there because our ancestors commanded it.

As for line numbers teaching something about how computers think-- that is exactly the advantage we get from getting rid of them. You and I are not computers, and nor are beginners. How this or that architecture works is for people interested in electronics, or more fundamentally physics, not for programmers. That's why the authors of instruction manuals don't know anything about neurology. ;P

Well, I've ranted longer, and in a less friendly tone, than I'd hoped, sorry about that. . .
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: FreeBASIC, BASIC, GOSUB, answers

Post by marcov »

Tiger wrote: PaulSquire, I too love the direction of FreeBASIC and I would also like to see ONE single version. It has nothing to do with "living in the past". Well, a bit maybe. It is just that there are loads of good! old BASIC programs that are suitable for beginners and waiting to be revived. David Ahl anybody?
If sb is bored, I still have this Basic listings for the C=64 book :-) (hmm, a bit of OCR...)


Seriously, nearly all those old programs make me want to bury them, and sit on the grave to guard that they never get out again :_)
Post Reply