Sign in to follow this  

Python or Basic?

This topic is 4474 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I was wondering if Python or BASIC is better to start off with. I have python and LibertyBASIC on my computer, and im tryin both. What are the pro's and con's of both?

Share this post


Link to post
Share on other sites
BASIC is a horrible, horrible language. It will teach you bad habits which you will spend years weaning yourself of. Go with Python.

Share this post


Link to post
Share on other sites
basic is a little easier to learn than python since it's alot closer to spoken english. But they are both definitely alot easier to learn than say c/c++.
pro's: they both require alot less typing than other languages like c/c++ to get stuff done(see "code complete" book for numbers)
con's: both dog slow compared to c/c++
both require you to include redistributables with your executable in order for user to run your programs
oh yeah another con that only applies to basic is that it will teach you bad habits that will be hard to break later. I think there is even some famous quote that goes something like "basic programmers are brain damaged beyond hope to learn any other language."
that's all I can think of off the top of my head.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Choose Python then, because BASIC is old, and was used for nonprogrammers to program relatively simple problems.

Share this post


Link to post
Share on other sites
Why is it that when people mention BASIC, you drag up old issues that applies to BASIC-languages from the late 80's.
The speed of the compiled applications depends on the compiler and not the syntax, and most newer BASIC-languages are NOT runtime interpreted.
I've seen and done benchmarking tests from languages like PowerBasic, PureBasic & BlitzMax and trust me, they do not fall behind.

So please stop with the old phrases, "It's interpreted, needs loads of runtime files and it's slow", because this simply ain't true anymore.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sweenie
Why is it that when people mention BASIC, you drag up old issues that applies to BASIC-languages from the late 80's.
The speed of the compiled applications depends on the compiler and not the syntax, and most newer BASIC-languages are NOT runtime interpreted.
I've seen and done benchmarking tests from languages like PowerBasic, PureBasic & BlitzMax and trust me, they do not fall behind.

So please stop with the old phrases, "It's interpreted, needs loads of runtime files and it's slow", because this simply ain't true anymore.


I agree. It's not the language it's the programmer. And most basic nowadays are very structured. The one I use (FreeBASIC) can compare it's speed (expression-wise) to almost 95% with that of GCC. I also use C, C++ , ASM and Pascal but I keep coming back to BASIC because it's fun to code with.

BTW, Freebasic can also use almost all C libs like OpenGL and SDL.

As a comparison, I made a FreeBASIC and C++ demo(OpenGL+SDL). Almost the same code and I don't notice any speed difference.

C++
http://rel.betterwebber.com/junk.php?id=48

FreeBASIC
http://rel.betterwebber.com/junk.php?id=47

Share this post


Link to post
Share on other sites
Hi there rt004,
How are you doing buddy?

The Problem
Learning BASIC or Python

The Solution
From my personal experiences with programmers that have used basic is that it's hard for them to learn other languages such as c-style languages cause of the huge syntax difference. Coming from a c-style learning language and coding in basic is easier. I would also say that with VB and C-style languages such as C#, c++, python that it comes down to the programmer although you find some people that code in VB learn horrible habbits as mentioned above.

There aren't really any pros or cons to the languages, I'd just say that the community has a strong point when it comes to languages and the general belief is that c-style languages are a better choice to learn.

Final point. Python ;)

Share this post


Link to post
Share on other sites
Python is leagues ahead of every version of Basic that I've had the misfortune to use. Does your version of Basic come with these?
  • An XML parser
  • Socket functions
  • Regular expression parsing
  • Convenient sequence and mapping types
  • inheritance and polymorphism support
  • functions that you can pass as parameters to other functions
  • Free downloadable MySQL and SQLite support
  • String handling functions such as splitting at delimiters


If not, then use Python.

Share this post


Link to post
Share on other sites
You forgot multithreading support too.

Python is MUCH more developed than Liberty Basic. Also, if you use the PyGame extension you'll be able to run your games on Macintosh and Linux without much if any adaptation. Liberty Basic is stuck with just Windows.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kylotan
Python is leagues ahead of every version of Basic that I've had the misfortune to use. Does your version of Basic come with these?
  • An XML parser
  • Socket functions
  • Regular expression parsing
  • Convenient sequence and mapping types
  • inheritance and polymorphism support
  • functions that you can pass as parameters to other functions
  • Free downloadable MySQL and SQLite support
  • String handling functions such as splitting at delimiters


If not, then use Python.

VB.NET has all of those...

Share this post


Link to post
Share on other sites
Quote:
Original post by Arild Fines
Quote:
Original post by Kylotan
Python is leagues ahead of every version of Basic that I've had the misfortune to use. Does your version of Basic come with these?
  • An XML parser
  • Socket functions
  • Regular expression parsing
  • Convenient sequence and mapping types
  • inheritance and polymorphism support
  • functions that you can pass as parameters to other functions
  • Free downloadable MySQL and SQLite support
  • String handling functions such as splitting at delimiters


If not, then use Python.

VB.NET has all of those...


I was reading this and all I could think of is "this must be satire", altough why would anyone want to use mySQL still has me wondering.

Share this post


Link to post
Share on other sites
Python. Python is used more widely than BASIC and you can do a lot more things with it, unless we're talking visual basic.

Python is also free but most of the recent BASIC languages you have to pay for.

Share this post


Link to post
Share on other sites
Go with python. Pre-VB.NET era basic is not very powerful as far as language features are concerned. It can instill bad habits, but you can write bad code in any language. VB.NET is powerful enough and would be fine to use, but I personally prefer python.

Share this post


Link to post
Share on other sites
Quote:
Original post by SpacedOut
Python. Python is used more widely than BASIC


That's not true - yet

Quote:

Python is also free but most of the recent BASIC languages you have to pay for.


You can program in VB.NET for free. Microsoft distributes their compiler free of charge, and you can download the free #develop to write your programs in (although Visual Studio.NET is better). Right now the Microsoft VS Express 2005 betas are free with registration, so you could get started with those too. Last I read MS planned to charge $50 USD for each VS Express package when they release. Definitely worth the price.

Share this post


Link to post
Share on other sites
Quote:
Original post by Arild Fines
Quote:
Original post by Kylotan
Python is leagues ahead of every version of Basic that I've had the misfortune to use. Does your version of Basic come with these?
  • An XML parser
  • Socket functions
  • Regular expression parsing
  • Convenient sequence and mapping types
  • inheritance and polymorphism support
  • functions that you can pass as parameters to other functions
  • Free downloadable MySQL and SQLite support
  • String handling functions such as splitting at delimiters


If not, then use Python.

VB.NET has all of those...


I'm sure it does. I was mainly asking if LibertyBasic, the version owned by the original poster, has those.

VB.NET is closer to Python than it is to VB 6, anyway. And I sincerely hope VB.NET's string handling is better than VB 6's, which is useless.

Share this post


Link to post
Share on other sites
Quote:
Original post by xMcBaiNx
I was reading this and all I could think of is "this must be satire", altough why would anyone want to use mySQL still has me wondering.


Because it's useful. Why would anyone not want to use it?

Share this post


Link to post
Share on other sites
Quote:
Original post by Kylotan
Quote:
Original post by xMcBaiNx
I was reading this and all I could think of is "this must be satire", altough why would anyone want to use mySQL still has me wondering.


Because it's useful. Why would anyone not want to use it?


I'll consider a database when it AT LEAST have stored procedures and the ability to have nested queries and working referential integrity (I heard that's coming tough, last time I tried, it wasn't worth mentionning). If you insist on going the free way, I heartily encourage you to try PostgreSQL. But that's another debate.

Edit: Reading the mySQL roadmap, it looks like they're finally giving a try at implementing the SQL standard correctly. It might be interesting to look at it in a year or so.

Share this post


Link to post
Share on other sites
Python has a much better syntax, is cross platform, can be used for all your programming projects, and just keeps getting better, more useful, and even faster. Things like liberty basic etc, are really dead ends. Stick with general purpose languages. This, of course, does not apply to Visual Basic, which is a useful general purpose language, but Python has Pygame, a great way to get started with graphics and still stay with a general purpose language. It's also used with Blender, the most popular open source modeler.

Share this post


Link to post
Share on other sites
Quote:

a) An XML parser
b) Socket functions
c) Regular expression parsing
d) Convenient sequence and mapping types
e) inheritance and polymorphism support
f) functions that you can pass as parameters to other functions
g) Free downloadable MySQL and SQLite support
h) String handling functions such as splitting at delimiters


Comparing with BlitzMax(crossplatform BASIC language)

a) No, but if I want it I can get it within a couple of hours.
b) Yes
c) No, same as a)
d) Yes
e) Yes
f) Yes
g) Not currently MySql, but definitely SQLite
h) Not built in but available as user addons or give me five minutes and I write myself

So if I miss anything I either write it myself or use a 3rd party api.
I can also include c, c++ and asm code since Bmax uses gcc and fasm.

[Edit]

Since the choice is between Python and Liberty Basic, I would go with python.
If the choice was between Python and BMax, I would go with BMax.

Share this post


Link to post
Share on other sites
Quote:
Original post by justdan
I would use basic only if you were brand new to computers as an introduction although it does teach you some very bad habits like over using goto.

Just because BASIC supports GOTO is no reason to abuse it. It is entirely possible to write structured code in BASIC, just as it is entirely possible to write unstructured code in, say, C.

Share this post


Link to post
Share on other sites

This topic is 4474 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this