if you want a very powerful language with a great syntax you should try Ada (my fav language with small talk). http://www.functionx.com/ada/Lesson02.htm
"C was designed to be written; Ada was designed to be read." -- Jean Ichbiah (ada inventor)
Who here likes the BASIC syntax and why ? If notTHENwhichDO?
Re: Who here likes the BASIC syntax and why ? If notTHENwhic
Just look at his age.MachineCode wrote:After looking at your profile posts, I agree with GeoTrail and Demivec. Your attitude here is indeed very negative and I don't know why you're here. You seem to hate Basic with a passion, but you understand C? I don't get that at all. Seems almost like you're just trolling and/or trying to pimp GameMaker here with every post.
We have to be a little patient with children
until they have grown up.

-
Zach
- Addict

- Posts: 1678
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: Who here likes the BASIC syntax and why ? If notTHENwhic
Once you get over the hurdle of learning a particular languages syntax, and various idiosyncrasies that come along with a given language, the only reason you should have a problem understanding code is because it is either
A) Poorly formatted / written
B) Poorly commented
C) Both.
C happens more often than A or B in my opinion, no matter what the language. You can sit here and argue about the perceived beauty of one language over another all day long, until you're blue in the balls; It doesn't change the fact you need to separate your personal preferences from bad coding.
I have a tough time reading any other persons code, no matter what language it is written in.. If I am familiar with the syntax, then well-structured and well-commented code makes it a lot easier to see what is going on, but I still think the BASIC-style Syntax is by far, the easiest to read. Just by purely logical standards. It is made of simpler keywords that are often indicative of what the commands are related to.
With more optimized / specialized languages you have a trade off of speed vs efficiency. It may be more efficient to use something like C or C++, but it will costs you some speed in the coding/reading code department.. While BASIC languages allow you to write easily understandable blocks in a fairly speedy manner, but may not always be the most efficient language to use for a given task.. Even then it comes down to situational preparedness and the old addage "the right tool for the right job".
And finally, you are comparing a Procedural language designed around a syntax intended for Beginners to be able to pick up easily, to an Object Oriented language which uses a completely different programming paradigm and is intended for more advanced users in Professional and Academic settings.. (This does not preclude PB from being used for those same purposes, it is simply an added benefit).
You're comparing Apples to Oranges - Great job.
A) Poorly formatted / written
B) Poorly commented
C) Both.
C happens more often than A or B in my opinion, no matter what the language. You can sit here and argue about the perceived beauty of one language over another all day long, until you're blue in the balls; It doesn't change the fact you need to separate your personal preferences from bad coding.
I have a tough time reading any other persons code, no matter what language it is written in.. If I am familiar with the syntax, then well-structured and well-commented code makes it a lot easier to see what is going on, but I still think the BASIC-style Syntax is by far, the easiest to read. Just by purely logical standards. It is made of simpler keywords that are often indicative of what the commands are related to.
With more optimized / specialized languages you have a trade off of speed vs efficiency. It may be more efficient to use something like C or C++, but it will costs you some speed in the coding/reading code department.. While BASIC languages allow you to write easily understandable blocks in a fairly speedy manner, but may not always be the most efficient language to use for a given task.. Even then it comes down to situational preparedness and the old addage "the right tool for the right job".
And finally, you are comparing a Procedural language designed around a syntax intended for Beginners to be able to pick up easily, to an Object Oriented language which uses a completely different programming paradigm and is intended for more advanced users in Professional and Academic settings.. (This does not preclude PB from being used for those same purposes, it is simply an added benefit).
You're comparing Apples to Oranges - Great job.
-
Seymour Clufley
- Addict

- Posts: 1267
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
Re: Who here likes the BASIC syntax and why ? If notTHENwhic
Good retort, Zach.
Something I've been wondering from the thread title... Is "which" a keyword in BASIC? I've never seen it.
Something I've been wondering from the thread title... Is "which" a keyword in BASIC? I've never seen it.
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
Re: Who here likes the BASIC syntax and why ? If notTHENwhic
Even comments can be eliminated if coded correctly, take this garbled mess, as if you just found this in the middle of a procedure: What are r and n? What does this actually do?
Okay, so that's obviously BAD. How about this then?It's still bad, but a bit more readable... but we still don't understand what it's doing!
So how about this:Ah ha! We understand what is going on now!
But could it be better?Why yes, yes it can, and without a single comment!
If coders have a priority of keeping everything readable is maintained, then procedures should be short and well named, variables should be well named, and use logical spacing to separate sections. Comments should be used for the "Whys?" of programming, not the "What?"
I'll admit of failing on these more often than I care to admit, but when I have to revisit code I end up refactoring it all to do it anyway.
We aren't hurting for memory or performance any more, if by doing this your source code inflates by 10kb... well, who cares?
And if you do care, why are you using a single sided 5.25" floppy disk on a modern computer? I'll let you in on a secret - usb pen drives!
Code: Select all
r = n / 2
While Abs( r - (n/r) ) > 0
r = 0.5 * ( r + (n/r) )
Wend
Debug "r = " + StrD(r)Okay, so that's obviously BAD. How about this then?
Code: Select all
result = number / 2
While Abs( result - (number/result) ) > 0
result = 0.5 * ( result + (number/result) )
Wend
Debug "result = " + StrD(result)So how about this:
Code: Select all
; Square Root of a number with Newton-Raphson approximation
result = number / 2
While Abs( result - (number/result) ) > 0
result = 0.5 * ( result + (number/result) )
Wend
Debug "result = " + StrD(result)But could it be better?
Code: Select all
Procedure.d SquareRootApproximation(number.d)
Protected result.d = number / 2
While Abs( result - (number/result) ) > 0
result = 0.5 * ( result + (number/result) )
Wend
ProcedureReturn result
EndProcedure
Debug "result = " + StrD(SquareRootApproximation(16))If coders have a priority of keeping everything readable is maintained, then procedures should be short and well named, variables should be well named, and use logical spacing to separate sections. Comments should be used for the "Whys?" of programming, not the "What?"
I'll admit of failing on these more often than I care to admit, but when I have to revisit code I end up refactoring it all to do it anyway.
We aren't hurting for memory or performance any more, if by doing this your source code inflates by 10kb... well, who cares?
And if you do care, why are you using a single sided 5.25" floppy disk on a modern computer? I'll let you in on a secret - usb pen drives!
- utopiomania
- Addict

- Posts: 1655
- Joined: Tue May 10, 2005 10:00 pm
- Location: Norway
Re: Who here likes the BASIC syntax and why ? If notTHENwhic
I like the BASIC syntax because it was the first programming language syntax I learned, on a
Dragon 64 with twin 160k (floppy)diskdrives.
BASIC still rules!
Dragon 64 with twin 160k (floppy)diskdrives.
BASIC still rules!
Re: Who here likes the BASIC syntax and why ? If notTHENwhic
Hi Primoz128. Like any language, readability usually leans towards the stronger command; and that applies not only to programming languages, but also to the spoken word. For example, one person's command of English, does not diminish another person's preference for French.
Your expression "crying about it" clearly implies a comfort level with the C syntax, but that should in no way reflect negatively on the syntax of other languages. If you wish to learn or use these other languages, fine, but you shouldn't expect them to change to suit you.
However, your argument about readability is inaccurate; hands down, BASIC syntax is anytime more comprehensible than C. The language was explicitly designed for that very purpose, READABILITY, and that's still the general consensus. Google and see for yourself.
As for performance, we have PureBasic! Unmatched in its class, it produces the fastest and smallest standalone cross-platform executables, with no room for any bloatware or unnecessary overheads; and accordingly, no OOP.
So, to answer your question, I like the BASIC syntax, and I love PureBasic!
Your expression "crying about it" clearly implies a comfort level with the C syntax, but that should in no way reflect negatively on the syntax of other languages. If you wish to learn or use these other languages, fine, but you shouldn't expect them to change to suit you.
However, your argument about readability is inaccurate; hands down, BASIC syntax is anytime more comprehensible than C. The language was explicitly designed for that very purpose, READABILITY, and that's still the general consensus. Google and see for yourself.
As for performance, we have PureBasic! Unmatched in its class, it produces the fastest and smallest standalone cross-platform executables, with no room for any bloatware or unnecessary overheads; and accordingly, no OOP.
So, to answer your question, I like the BASIC syntax, and I love PureBasic!
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel 
