What is wrong with the BASIC language?

For other topics related to the FreeBASIC project or its community.
marcov
Posts: 2969
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: What is wrong with the BASIC language?

Postby marcov » Apr 22, 2015 14:01

anonymous1337 wrote:
But some languages are more succinct, productive, "expressive", etc. I mean, for example, one cool thing in Ruby is the method_missing method which is invoked if you try and invoke a method that doesn't exist. So even if the method isn't defined, you can do: HtmlGenerator.Div()


I don't think language expressiveness is that important, see e.g. Java or C#. I think it is more the rest of the product: general toolchain completeness, quality and ide, debugger, designer, libraries.

And it matters who introduces the language. It helps if you are in every IT management magazine and on every website. It helps less to be hosted at Tripod, geocities or have a source-only github account.
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Re: What is wrong with the BASIC language?

Postby anonymous1337 » Apr 22, 2015 14:29

marcov wrote:
anonymous1337 wrote:
But some languages are more succinct, productive, "expressive", etc. I mean, for example, one cool thing in Ruby is the method_missing method which is invoked if you try and invoke a method that doesn't exist. So even if the method isn't defined, you can do: HtmlGenerator.Div()


I don't think language expressiveness is that important, see e.g. Java or C#. I think it is more the rest of the product: general toolchain completeness, quality and ide, debugger, designer, libraries.

And it matters who introduces the language. It helps if you are in every IT management magazine and on every website. It helps less to be hosted at Tripod, geocities or have a source-only github account.

True. Isn't the main thing holding D back after all these years (still) is the lack of a competitive standard library? Or has that been fixed? Or has Rust taken its place? Or Jonathan Blow's new compiler? Etc. I don't know.

Yeah, but Java has these "great" reflection capabilities, and yeah good enterprise-level tools. I'm talking out of my butt now. I actually don't know what it takes to launch a successful toolchain or language, so maybe you're right...
marcov
Posts: 2969
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: What is wrong with the BASIC language?

Postby marcov » Apr 22, 2015 14:48

anonymous1337 wrote:
True. Isn't the main thing holding D back after all these years (still) is the lack of a competitive standard library?


Microsoft pushes .NET and C++, Linux and *nix as a platform pushes C, Oracle pushes Java. O'Reilly pushed several scripting languages over the years. PHP simply filled a need.

The educational sector sooner or later backs down

Who pushes D that is in that ballpark? Or what immediate need that can't be satisified otherwise does it fill?

I actually don't know what it takes to launch a successful toolchain or language, so maybe you're right...


If you have to pick one thing, it is a major backer.

Anyway the question that this thread poses is fundamentally flawed and only meant for an FB audience internal consumption. The correct question should be "Why FB/Basic?", not "Why not...?"
BasicCoder2
Posts: 3558
Joined: Jan 01, 2009 7:03
Location: Australia

Re: What is wrong with the BASIC language?

Postby BasicCoder2 » Apr 22, 2015 17:43

anonymous1337 wrote:
BasicCoder2 wrote:
D.J.Peters wrote:BASIC as hobby is OK but in business you need at least.
C++, PHP, JavaScript and JAVA in automotive and financial environments.

So those languages provide something that FreeBasic is incapable of doing.

I'm not sure that's the implication. I mean, again, Turing Completeness. Anything Turing Complete can compute anything computable (in theory, if there's unlimited time and memory).


Let me spell out what I mean by saying one language can do something another is incapable of doing for me.

Seven years ago I was using C++ and had just started figuring out the SDL library before discovering FreeBasic and its innate easy to use graphics. Plain C++ could not do graphics. Sure with its Turing completeness you could write a graphics library but only if you had the knowledge required. On the old machines that knowledge was the hardware manual and along with Assembler it enabled me to write my own graphics and sound routines. Now the knowledge is the operating systems requirements and the Window's API or something called DirectX. The point is you needed the knowledge with C++ but not with FreeBasic. That was why I could do things with FreeBasic which I couldn't do with another language. That was the power it placed in my hands. FreeBasic could thus do something for me that C++ could not. That is what I am talking about. And it applies to other languages as well. From what I have read it seems Python will enable me to do things I could not with FreeBasic because it provides what is required with imports.

One reason I stuck with FreeBasic was because at the time I was writing programs that required webcam input. I had intended using C++ and the escapi.dll until Joshy provided a .bi file to make use of the escapi.dll with FreeBasic. Up until that point I could do something (use the webcam) with C++ but not with FreeBasic. Now there are imports that enable you to use the webcam and other video input using Java or Python. And there are even more imports to other languages that enable you to do things I would be incapable of doing with FreeBasic. These imports are written by people with the required know how.
BasicCoder2
Posts: 3558
Joined: Jan 01, 2009 7:03
Location: Australia

Re: What is wrong with the BASIC language?

Postby BasicCoder2 » Apr 22, 2015 17:51

marcov wrote:
anonymous1337 wrote: Anyway the question that this thread poses is fundamentally flawed and only meant for an FB audience internal consumption. The correct question should be "Why FB/Basic?", not "Why not...?"

Well it was only meant for a FB audience. Perhaps I should have written what is wrong with the FreeBASIC language because you can do things with FreeBASIC (low level programming) that you might not be able to do with say Simple BASIC although you can do some neat stuff with simple BASIC you can't do as easily with FreeBASIC.

It was a serious question for I have been wondering if there was another language as readable as FreeBASIC but with imports available that gave it more power. I have been messing with Python over the last few days and really don't like it at all.

What would be nice would be one language as easy to write and read as FreeBasic that could do it all.
Boris the Old
Posts: 139
Joined: Feb 04, 2011 20:34
Location: Ontario, Canada

Re: What is wrong with the BASIC language?

Postby Boris the Old » Apr 23, 2015 5:41

BasicCoder2 wrote:What would be nice would be one language as easy to write and read as FreeBasic that could do it all.


COBOL ?????
integer
Posts: 390
Joined: Feb 01, 2007 16:54
Location: usa

Re: What is wrong with the BASIC language?

Postby integer » Apr 23, 2015 8:51

Boris the Old wrote:
BasicCoder2 wrote:What would be nice would be one language as easy to write and read as FreeBasic that could do it all.

COBOL ?????

GOOD ONE!
COBOL, Very easy to write and easy to read.
(However, there are a few things that are an incredible PITA to do in COBOL.)
RPG (Report Program Generator) is easy for generating reports and easy to read, but, alas, it can not do it all.
BasicCoder2
Posts: 3558
Joined: Jan 01, 2009 7:03
Location: Australia

Re: What is wrong with the BASIC language?

Postby BasicCoder2 » Apr 23, 2015 11:31

integer wrote:
Boris the Old wrote:
BasicCoder2 wrote:What would be nice would be one language as easy to write and read as FreeBasic that could do it all.

COBOL ?????

GOOD ONE!
COBOL, Very easy to write and easy to read.

However I personally find BASIC easier and I thought COBOL was specialized for business programs.
Easy to write and read isn't really enough it must also be well supported with useful imports for GUI, hardware or web programs.
Boris the Old
Posts: 139
Joined: Feb 04, 2011 20:34
Location: Ontario, Canada

Re: What is wrong with the BASIC language?

Postby Boris the Old » Apr 23, 2015 18:37

BasicCoder2 wrote:However I personally find BASIC easier and I thought COBOL was specialized for business programs.
Easy to write and read isn't really enough it must also be well supported with useful imports for GUI, hardware or web programs.


Modern COBOL is actually very powerful and contains support for modern features. It also supports low-level stuff like pointers, and the ability to interface with libraries like FLTK, LUA, etc.

Since we have 40 years worth of applications that need to be modernized, we are on a long term project to convert all of them to a single cross-platform language. About 60% of our code is in COBOL, with the rest split between MASM, BASIC, and FORTRAN. For the past five years, using PureBasic and FreeBasic for prototyping, we've been developing techniques to be used in converting all our code to GnuCOBOL (previously known as OpenCOBOL).

Rod
caseih
Posts: 1505
Joined: Feb 26, 2007 5:32

Re: What is wrong with the BASIC language?

Postby caseih » Apr 23, 2015 19:44

marcov wrote:
caseih wrote:
By the way, every FB programmer (or C programmer) should consider the GLIB library to be an essential data structure library. Hash tables, lists, trees, it has them all.


Why? FB is an OOP capable dialect nowadays, and doesn't need to emulate one using a library?

Apropos LISP: I never had much faith in a language named after a speech impediment.


Sorry I wasn't clear. glib consists of a bunch of utility functions that gobject is built off of. But I'm not referring to goject. glib has utility functions that provide basic data structures in a nice C-based API. Trees, hashes, lists, etc. Probably way better than implementing your own. I'm sure you could wrap them in FB oop wrappers if you wanted. Again, though, nothing to do with OOP.
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

Re: What is wrong with the BASIC language?

Postby agamemnus » Apr 24, 2015 5:05

anonymous1337 wrote:Yeah, man. BASIC was great for game prototypes when tools to just make games appear out of thin air didn't exist. Now they do exist, and I feel a thorough evaluation of modern tools and education methods (specifically, human computer interaction) is needed to think more about how to "improve" BASIC.


Yes, I agree with both you and St_W. But, my opinion is that everything except Javascript is obsolete for any GUI purpose, so I am biased. In terms of Freebasic, I think the best use is for when you want to do something computationally expensive done with a reasonable amount of speed (which more high-level languages like Javascript just can't offer), or you want to do some quick and dirty calculation program (again, with speed).

P.S.:
I worked with it for a jigsaw game I made for Android, which was part Javascript and part Java. What I felt before I started and as what I confirmed as I worked with it is that Java has a half-baked abstraction design principle... it is not quite as high-level as C, but requires a certain design skeleton, making it difficult to work with and not as abstract as Javascript. It is just something that seems to be pushed down people's throats nowadays.
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Re: What is wrong with the BASIC language?

Postby anonymous1337 » Apr 24, 2015 6:36

agamemnus wrote:
anonymous1337 wrote:Yeah, man. BASIC was great for game prototypes when tools to just make games appear out of thin air didn't exist. Now they do exist, and I feel a thorough evaluation of modern tools and education methods (specifically, human computer interaction) is needed to think more about how to "improve" BASIC.

Yes, I agree with both you and St_W. But, my opinion is that everything except Javascript is obsolete for any GUI purpose, so I am biased. In terms of Freebasic, I think the best use is for when you want to do something computationally expensive done with a reasonable amount of speed (which more high-level languages like Javascript just can't offer), or you want to do some quick and dirty calculation program (again, with speed).
Dude, v8 is f*ing fast these days :)

http://benchmarksgame.alioth.debian.org ... &lang2=gcc

Considering most people are processing server-side js using v8 + node.js (which then hands execution off to async c++ modules), those benchmarks are not bad at all given everything JavaScript can do.

agamemnus wrote:
anonymous1337 wrote:Yeah, man. BASIC was great for game prototypes when tools to just make games appear out of thin air didn't exist. Now they do exist, and I feel a thorough evaluation of modern tools and education methods (specifically, human computer interaction) is needed to think more about how to "improve" BASIC.

I worked with it for a jigsaw game I made for Android, which was part Javascript and part Java. What I felt before I started and as what I confirmed as I worked with it is that Java has a half-baked abstraction design principle... it is not quite as high-level as C, but requires a certain design skeleton, making it difficult to work with and not as abstract as Javascript. It is just something that seems to be pushed down people's throats nowadays.

Not quite as high-level as C? I would consider Java quite a bit higher level than C... but to a point, where you are forced to follow certain patterns in Java, I don't think "higher level" vs "lower level" matters much any more. It's just different.

Java's pushed down people's throat thanks to the excellent marketing by Sun and now the big push by Oracle to make it available to enterprise development. You can have a team of 200+ people, a lead architect and their minions who tell you how things should be coded, what patterns to use, etc. and even lesser minions who actually implement that design or particular functions.

As crazy as I think design patterns are (I don't like them too much), the conformity is impressive. I think Java will continue to be valued for a while. There are just too many bad programmers. Java won't make them better, but it perhaps makes them usable by people who actually can program.
RockTheSchock
Posts: 230
Joined: Mar 12, 2006 16:25

Re: What is wrong with the BASIC language?

Postby RockTheSchock » Apr 24, 2015 7:00

I think FreeBASIC needs to have some features which makes it distinct to C and C++. I am not an expert in C++ but just make 1 or 2 things better than in C++: maybe strings and a working plattform independent bidirectional "open pipe".

builtin graphics and string functions could be optimised to use SSE2. You could almost double the speed.

Maybe with fbc 2.0 there have to be another break. "-lang fb2" No more quirk syntax at all. Maybe with a seperate 2-pass-compiler from scratch which supports class keyword. No more type/ class aliases needed.
St_W
Posts: 1494
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: What is wrong with the BASIC language?

Postby St_W » Apr 24, 2015 9:08

RockTheSchock wrote:Maybe with fbc 2.0 there have to be another break. "-lang fb2" No more quirk syntax at all. Maybe with a seperate 2-pass-compiler from scratch which supports class keyword. No more type/ class aliases needed.

I agree that we should update the FreeBasic language as it still contains quite a lot of legacy stuff. Of course this would break compatibility, so maybe it should be really a new -lang option, although there are already several (which adds complexity to the compiler and may confuse users). For example there are these integrated commands with a custom syntax like LINE. I would also consider moving all fbgfx stuff or better all integrated functionality into an own namespace as these names clutter the global namespace. Of course there should be still some option to import the names into the current namespace with some "using" or "import" clause.

However, changing the FreeBasic language in a way so that no backwards compatibility is given could also be a risk. Take Python 2.7.x vs. Python 3.x as example. There weren't that many changes (for example: print "Hello World" has to be written as print("Hello World") in 3.x) but still many users refused to switch to Python 3.x and kept using 2.7.x. The situation got better over time, but it needed several years.

This could especially be a problem for BASIC, as there are many elder people using it, who are often more skeptical regarding changes of well-known things / introducing new things - compared to young people.
marcov
Posts: 2969
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: What is wrong with the BASIC language?

Postby marcov » Apr 24, 2015 9:52

caseih wrote:
Sorry I wasn't clear. glib consists of a bunch of utility functions that gobject is built off of. But I'm not referring to goject. glib has utility functions that provide basic data structures in a nice C-based API.


Nice is relative, since it delivers an external dependency that must be deployed (since afaik it is LGPL and not GPL-with-static-linking exception?)

Trees, hashes, lists, etc.


IMHO any sane language should strive to deliver this in its RTS using its own OO system.

Probably way better than implementing your own.


Depends. For a few high performance users maybe, for the bulk ease of use weighs heavier. (and that includes deployment)

I'm sure you could wrap them in FB oop wrappers if you wanted. Again, though, nothing to do with OOP.


Either way it is not 100% mandatory to do procedurally either, so my assumption was not unjustified.

And euh, it is 2015 now. We should be talking about making it generic classes or not instead of discussing if it is a class or not :-)

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests