Who here likes the BASIC syntax and why ? If notTHENwhichDO?

Everything else that doesn't fall into one of the other PB categories.
User avatar
Demivec
Addict
Addict
Posts: 4283
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by Demivec »

moogle wrote:I was more looking for code examples of how something is written procedurally and an example of how it is in OOP but I'm starting to understand a bit more how I would go about programming things without using 'objects'.
Why don't you just start some thread topics with OOP examples that you would try to implement procedurally? If you kept it simple you could get several ideas on how it might be done.
moogle
Enthusiast
Enthusiast
Posts: 372
Joined: Tue Feb 14, 2006 9:27 pm
Location: London, UK

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by moogle »

Demivec wrote:
moogle wrote:I was more looking for code examples of how something is written procedurally and an example of how it is in OOP but I'm starting to understand a bit more how I would go about programming things without using 'objects'.
Why don't you just start some thread topics with OOP examples that you would try to implement procedurally? If you kept it simple you could get several ideas on how it might be done.
I will do that later on today, as first I have to figure which examples to post and lastly it's very late in England and I'm off to sleep :)
Hopefully this will get me on the road to using PureBasic full time.
Image
User avatar
Primoz128
Enthusiast
Enthusiast
Posts: 212
Joined: Sat Sep 10, 2011 8:25 pm
Location: Slovenia

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by Primoz128 »

Syntax is not a minor thing, it's a major thing because your gona be coding in that syntax non stop, IT IS MAJOR.

I would like to see more examples of your people's way of coding in PB, so that i can find a more suited one for myself.
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by Shield »

I actually think basic is harder to read once you learned one of those C styled languages.
Of course it's easier for a beginner to read "or" instead of "||" for example, but that doesn't
mean that it's also easier to read for an experienced coder.

My major concern is the lack of compactness in BASIC languages.
In C styled languages I can write compact code where it makes sense but in basic I always have to write "the long version".
moogle wrote:Tried creating a Window in C++? :lol:
If you make all the commands available in C++ wich you can directly use in PB it's almost exactly the same deal. :wink:
Don't count libraries as part of the language if you compare languages. (And by the way if you do this PB stands no chance anyway regarding functionality).
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
gnasen
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Sep 24, 2008 12:21 am

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by gnasen »

When I was a beginner I used VB and c++ and honestly I had great problems in reading codes of other people. I just have the feeling, that many people who use something like c++ use much of its advanced syntax possibilities (fancy using of --a etc). And I dont like all this brackets, I have very often to take code and reformat it completly (event today) to get into it. Its just an observation from me that this happens very very rearly with PB codes from other people.
However, I think that languages like c++ are more powerful then any basic out there, but I just enjoy coding in PB and most things can be done with it. And for me fun>functionality as long as its only a hobby ;)
pb 5.11
Thorium
Addict
Addict
Posts: 1314
Joined: Sat Aug 15, 2009 6:59 pm

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by Thorium »

Shield wrote: Don't count libraries as part of the language if you compare languages. (And by the way if you do this PB stands no chance anyway regarding functionality).
If we count functionality it's almost the same, as you can use all libs with PB too. Still sting handling in BASIC is just better.

The only major thing is that there is a C or C++ compiler for about any plattform in existence.
moogle
Enthusiast
Enthusiast
Posts: 372
Joined: Tue Feb 14, 2006 9:27 pm
Location: London, UK

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by moogle »

Shield wrote:
moogle wrote:Tried creating a Window in C++? :lol:
If you make all the commands available in C++ wich you can directly use in PB it's almost exactly the same deal. :wink:
Don't count libraries as part of the language if you compare languages. (And by the way if you do this PB stands no chance anyway regarding functionality).
Ah I know but I was just saying for getting a quick demo program up and running it's pretty quick in PB, however if I knew all the API functions for C++ to make the window and handle messages I'm sure it'd be just as quick but just a few more lines longer :)
Image
User avatar
GeoTrail
Addict
Addict
Posts: 2799
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by GeoTrail »

Hey mr negative. If you dont like the basic language, dont use it. Ive checked your previous posts. I get a very negative vibe from you. Perhaps you should move on.

Btw, this post was ment for the thread starter.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
User avatar
Primoz128
Enthusiast
Enthusiast
Posts: 212
Joined: Sat Sep 10, 2011 8:25 pm
Location: Slovenia

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by Primoz128 »

GeoTrail wrote:Hey mr negative. If you dont like the basic language, dont use it. Ive checked your previous posts. I get a very negative vibe from you. Perhaps you should move on.

Btw, this post was ment for the thread starter.
I never said i don't like PB or anything like that, and if you so think that i do, then piss off cause this thread is not about negative stuff on PB. You clearly can't read.
User avatar
Demivec
Addict
Addict
Posts: 4283
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by Demivec »

One of the goals of the syntax and the language is to be easier to read and understand. There are languages that put even more stress on readability (poor COBOL). I think PureBasic ranks well in its readability.

How does this affect its execution speed? I don't think it affects it at all, the executable is a machine readable translation.

How does this affect the speed at which you code or enter a program? Well, if contains elements of spoken languages (familiar to people) and you have tools such as auto-completion. I don't think there is too much typing required to express a thought (unless you type very slowly), usually it's the thinking speed of the coder that runs slower :wink: (in general).
GeoTrail wrote:I get a very negative vibe from you.
@Primoz128: I agree with GeoTrail, you seem to be on a negative bent. If you are on a negative bent, my saying so probably won't help. :mrgreen: It may just be the way you express things, if so please ignore the comment. It just seems that you would rather spend your time expressing your angst why PureBasic isn't something else.

If it is just a matter of questioning how you would accomplish something in PureBasic that you know how to do in another language simply ask those questions. I mean getting your programming questions answered seems like it would be more useful than merely standing on the fence and asking which side of the fence has greener grass growing on it.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by Tenaja »

Primoz128 wrote:Well i am just wondering how many of you like BASIC syntax and for what reason, i personally am crying about it ;( i want c++ one... brackets ftw...

So ?
Yeah, if you don't call this a "negative attitude," Primoz, then you need to go back to the dictionary. You started the post saying you cry about PB's syntax and prefer C++. That's about as negative as it gets.
User avatar
Primoz128
Enthusiast
Enthusiast
Posts: 212
Joined: Sat Sep 10, 2011 8:25 pm
Location: Slovenia

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by Primoz128 »

Tenaja wrote:
Primoz128 wrote:Well i am just wondering how many of you like BASIC syntax and for what reason, i personally am crying about it ;( i want c++ one... brackets ftw...

So ?
Yeah, if you don't call this a "negative attitude," Primoz, then you need to go back to the dictionary. You started the post saying you cry about PB's syntax and prefer C++. That's about as negative as it gets.
Have it your way.
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by Foz »

Primoz128 wrote:My style of formating code:

Code: Select all

if (a = 1) 
   {
      if (b = 1) 
         {
            if (c = 3) 
               {
                  // code
               }
           else 
              {
                  // code
              }
         }
      else 
         {
            // code
         }
   }
else 
   {
      // code
   }
Though that style of formatting is better, it still looks chaotic to me. Beauty is in the eyes of the beholder.

I can only say this:
I prefer Basic style syntax. It's why I use VB.net and not C# at work, it's why I have avoided Java entirely. That said, I have an understanding of languages now to say that in general, I understand and can work in all languages as there is extensive common themes to them (variable declaration, if, for, repeat/do/loop) it's simply just knowing how to translate from one language to another.
You prefer C style syntax. If you prefer it, and understand it, then use it.

If you really want to see code translations, google search Rosetta Code, and most of the exercises have created for PB, and most other languages.
Last edited by Foz on Sun May 06, 2012 12:14 am, edited 1 time in total.
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by MachineCode »

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.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
User avatar
idle
Always Here
Always Here
Posts: 6238
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Who here likes the BASIC syntax and why ? If notTHENwhic

Post by idle »

Primoz128 wrote:Syntax is not a minor thing, it's a major thing because your gona be coding in that syntax non stop, IT IS MAJOR.

I would like to see more examples of your people's way of coding in PB, so that i can find a more suited one for myself.
Sounds more like your asking about coding style as opposed to syntax

Fred made an interesting observation on that and I'd tend to agree PB's syntax has led to a fairly standardised format
http://www.purebasic.fr/blog/?p=331
Windows 11, Manjaro, Raspberry Pi OS
Image
Post Reply