BASIC was meant to be easy to learn, read and understand

For other topics related to the FreeBASIC project or its community.
BasicCoder2
Posts: 3403
Joined: Jan 01, 2009 7:03

Re: BASIC was meant to be easy to learn, read and understand

Postby BasicCoder2 » Dec 23, 2016 23:08

marcov wrote:
BasicCoder2 wrote:Another example is Scratch,
https://scratch.mit.edu/


I think you can never compared walled garden where every path is preprepared with a general purpose tool like FB. I also think the whole thread heaps the unschooled but continuous users and the various levels of total beginners too much together.

First pick an audience, then make an argument. Don't try to add various audiences in the hope that something sticks.



The audience BASIC was intended for:

https://www.britannica.com/technology/BASIC
BASIC, in fullBeginner’s All-purpose Symbolic Instruction Code, Computer programming language developed by John G. Kemeny and Thomas E. Kurtz (b. 1928) at Dartmouth College in the mid 1960s. One of the simplest high-level languages, with commands similar to English, it can be learned with relative ease even by schoolchildren and novice programmers.
marcov
Posts: 2793
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: BASIC was meant to be easy to learn, read and understand

Postby marcov » Dec 23, 2016 23:25

BasicCoder2 wrote:The audience BASIC was intended for:


If you want to be strict that means "Beginners from the mid 1960's", which is fairly useless as definition.
BasicCoder2
Posts: 3403
Joined: Jan 01, 2009 7:03

Re: BASIC was meant to be easy to learn, read and understand

Postby BasicCoder2 » Dec 24, 2016 0:00

marcov wrote:
BasicCoder2 wrote:The audience BASIC was intended for:


If you want to be strict that means "Beginners from the mid 1960's", which is fairly useless as definition.


It is unclear to me what your issue here is. BASIC defined as an easy to learn, read and understandable computer language hasn't changed.
FreeBASIC has been extended into a very powerful language for experienced and knowledgeable programmers but those extensions are made for such experts they are not for the audience that the BASIC language was written for and for that reason it is not something you would choose if you were such an audience wanting to make use of a modern computer.

The reason I changed to FB was because at the time I was starting to learn to use the SDL library with C++ and FB gave me the graphics in an old language I had once used, QBASIC. I didn't choose FB because it was also able to make use of the SDL library on the contrary it saved me the bother by hiding all the complexity in an easy to learn, read and understand set of graphic statements.
.
Boris the Old
Posts: 134
Joined: Feb 04, 2011 20:34
Location: Ontario, Canada

Re: BASIC was meant to be easy to learn, read and understand

Postby Boris the Old » Dec 24, 2016 1:01

BasicCoder2 wrote: BASIC defined as an easy to learn, read and understandable computer language hasn't changed..


Actually, things changed very soon after the language was invented. -- it has always been evolving.

With the advent of minicomputers in the early 1970s, BASIC became a business oriented language that supported GUIs and file handling. It was not a teaching aid -- it was a powerful revenue generator that allowed people like me to earn a very good living writing business applications. And it still does.

Rod
BasicCoder2
Posts: 3403
Joined: Jan 01, 2009 7:03

Re: BASIC was meant to be easy to learn, read and understand

Postby BasicCoder2 » Dec 24, 2016 4:22

Boris the Old wrote:
BasicCoder2 wrote: BASIC defined as an easy to learn, read and understandable computer language hasn't changed..


Actually, things changed very soon after the language was invented. -- it has always been evolving.


But not the requirement that it is easy to learn, read and understand to still be called a BASIC language.

For example its evolution removed line numbers and GOSUB making it even more readable and easier to modify.

Commands were extended to handle fonts and different image and sound formats.

Visual Basic was easy to learn, read and understand.

Why they introduced C# is unclear to me particularly as it seemed to have a one to one correspondence with VB.NET code except mainly for the curly brackets which I suspect is a requirement for a professional language.

.
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: BASIC was meant to be easy to learn, read and understand

Postby sancho2 » Dec 24, 2016 8:21

C# coupled with the VStudio IDE is so easy to get into. Difficult to master though. But I would certainly recommend it to a beginner.
The real question is why did they create VB.Net? C# is far more popular..

Since there is no tutorial for FB oop, why not build some classes in a language that does have some tutorials or that you already are familiar with. Then convert them to FB and if you have any problems post those here.
Lots of people here can help with conversions like that.
Very few have the in depth knowledge to be able to write a comprehensive tutorial, even for beginning FB oop. (FXM is the most active and truly an expert).
Tourist Trap
Posts: 2768
Joined: Jun 02, 2015 16:24

Re: BASIC was meant to be easy to learn, read and understand

Postby Tourist Trap » Dec 24, 2016 12:49

sancho2 wrote:

A tutorial in OOP in freebasic would require to know what's the specificity of OOP in fb. For instance what I try to do is objects communicating each others: is it what fb is focused on ?(obviously not)
But if there is no specificity, it's just absolutely basic to show a udt that embeds property, methods, and fields.
A constructor is just an initializer of an instance, it's logical to initialize something when you use Dim, so it is for objects. Destructors are called when the object is destroyed giving the user the chance to do something at this moment, maybe save something on the disk or whatever he wants, but in fb a default destruction is already provided in any cases.

What I mean is that until you have a goal for using udt, there can't be any good tutorial. A general purpose tutorial would be a very boring list of syntax. And as fb is still under heavy development about oop syntax, things are often not exactly smooth syntax and can be difficult to memorize. I would say, give your intentions , then let's see how to do in that case.
MrSwiss
Posts: 3307
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: BASIC was meant to be easy to learn, read and understand

Postby MrSwiss » Dec 26, 2016 13:03

@BasicCoder2,

you seem to totally forget, that:

Billions of people on this planet, are NOT native english speakers.

Therefore, even BASIC is NOT at all that easy, to learn, read and understand (unless you're learning english first).
BasicCoder2
Posts: 3403
Joined: Jan 01, 2009 7:03

Re: BASIC was meant to be easy to learn, read and understand

Postby BasicCoder2 » Dec 26, 2016 20:36

@sancho2
In fact I have spent time with C++ OOP tutorials but really I program as I did on the C64 and old PC's and found no need to resort to OOP to convert an idea to code.
.
BasicCoder2
Posts: 3403
Joined: Jan 01, 2009 7:03

Re: BASIC was meant to be easy to learn, read and understand

Postby BasicCoder2 » Dec 26, 2016 20:38

Tourist Trap wrote: A general purpose tutorial would be a very boring list of syntax.

Yes for the casual user examples are better and it should be used to show how it solves a problem. OO has never solved anything for me it has just made the code longer and harder to read. Unlike C++ with hundreds of books on OOP FB will always be a hard road for any beginner.
.
BasicCoder2
Posts: 3403
Joined: Jan 01, 2009 7:03

Re: BASIC was meant to be easy to learn, read and understand

Postby BasicCoder2 » Dec 26, 2016 20:43

MrSwiss wrote:Billions of people on this planet, are NOT native English speakers.

It is only the keywords that are in English and it seems to me you could have a switch in the Editor that would print and accept keywords in whatever language you like. Otherwise I notice all the labels and comments are in the language of the user. A problem will arise however if short cut words are used such as btn instead of button as btn would not be recognized by a translator as a word. The order of words can be different also as I found out when running some source code through a translator with non-English labels.

Whatever language a set of commands is taken from it should be easy to learn, read and understand to a casual user for that is why the BASIC language was first invented so as to make programming reachable to a wider audience. There are more difficult but more powerful languages available to the professional who has the academic background to make use of them. In some ways FB with its extensions is now a mix of both easy and hard.
.
caseih
Posts: 1386
Joined: Feb 26, 2007 5:32

Re: BASIC was meant to be easy to learn, read and understand

Postby caseih » Dec 27, 2016 2:23

I'm not sure you could substitute keywords for foreign languages and still be simple and direct. BASIC is based (and most all programming languages actually) on English sentence grammar structure. If this then that. That format may not be the natural way sentences go together in other languages. English is the lingua franca of computers, just like Italian is the lingua franca of music notation. You just learn or memorize it.

As for OOP, it's great that FB doesn't force it on users, like Java does. It's not the only paradigm in the world and it's not always appropriate. But I can tell you that when you find yourself coding functions and subs such that you are constantly passing state information to them, that's when you should switch to OOP and encapuslate that state in an object. Often going to OOP is a natural refactoring as your code progresses, but you don't have to start there.
BasicCoder2
Posts: 3403
Joined: Jan 01, 2009 7:03

Re: BASIC was meant to be easy to learn, read and understand

Postby BasicCoder2 » Dec 27, 2016 2:57

caseih wrote:BASIC is based (and most all programming languages actually) on English sentence grammar structure. If this then that.

As opposed to maybe, that if this?

Code: Select all

x=43 IF y>7

I guess English speakers have an advantage. Thanks to England and America it is now the dominate language.
.
marcov
Posts: 2793
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: BASIC was meant to be easy to learn, read and understand

Postby marcov » Dec 27, 2016 15:49

I'm more in favor of keywords instead of symbolic notation because it reads faster. (the mind is trained to read (whole) words, not symbols).

I always thought the whole theories about programming languages like natural languages with the similarity of 40 keywords max is vastly overrated, except maybe for the very youngest.

40 words are learned in what, one hour? Two ?
Last edited by marcov on Dec 28, 2016 14:01, edited 1 time in total.
caseih
Posts: 1386
Joined: Feb 26, 2007 5:32

Re: BASIC was meant to be easy to learn, read and understand

Postby caseih » Dec 27, 2016 23:01

I agree about words vs symbols. APL[1] is not a language I'd want to learn for example (even if I had a special keyboard). I am a big fan of having fewer keywords. As few as possible, actually. The core of FB is really about 30-40 keywords, with the remainder really being calls into the runtime library with special syntaxes. At least with FB we can undefine keywords from the extended runtime library, and we can re-use them.

Yes BasicCoder2, that is true. I suspect if computers had been invented in another country, we'd have just memorized other language's words and possibly a different grammar order.

[1] https://en.wikipedia.org/wiki/APL_%28pr ... anguage%29

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest