[Gambas-user] A little article on Gambas on Phoronix (ISS Boss)

Nigel Verity nigelverity at ...67...
Wed Nov 27 12:33:15 CET 2013




Dear All

It's been interesting to read about perceptions that BASIC is a "toy" programming language, not to be used for serious projects. I have to reject this notion. There are some very low level system programming tasks for which BASIC may not be the best choice but, in principle, like any other programming language, BASIC is as good as the programmer using it.

I started my programming in the 1980s using FORTRAN 77. I wrote some dreadful "spaghetti" code in those days but, as my experience grew, so did the structure and quality of my programs. After a brief period using CORAL 66 I moved onto using COBOL. If ever there were a language which looks like a "toy" then it is COBOL, using words instead of operator symbols e.g "ADD X TO Y GIVING Z" instead of x + y = z. Deeper reflection shows that this makes the language far more self-documenting than any other. I don't know about now, but for a long time most of the world's banking system was built using COBOL so it must have had something going for it.

Since those days I've used C, C++, Pascal and flavours of BASIC, such as VB and Gambas. In all of those languages it's possible, in fact easy, to write clear, well-structured, easily-maintainable code. It's a failure of the programmer when the logic of a program jumps about all over the place; not a weakness in the programming language. Even C supports "goto" commands and labels.

One thing I have observed over the years is that a lot of programmers like to create the impression to non-developers that coding is intrinsically difficult. The syntax of C and C++ in particular helps to perpetuate this myth. Even fairly experienced developers can be a little awe-struck by uncommented code which embeds several levels of nested functions in a single line. It would probably be quite comprehensible if divided over multiple lines with consistent indentation and a few comments.

I think that the simpler the code is to write and understand, the better the overall quality is likely to be. The BASIC syntax has many advantages in this respect, especially for anybody with a knowledge of English.

It is noteworthy that Gambas and VB have been dismissed as if they are not "proper" development tools. Surely their efficiency for developing applications sets them apart from every other tool. Using either Gambas or VB, it would take less than 60 seconds for anybody with a little experience to start a new project and create a form containing a button which, when clicked, displays a message. I would challenge anybody to do that using any other tools or programming languages.

When all programs ran in text mode, managing the user interface constituted a far smaller proportion of the code. When Windows and the Mac introduced the GUI to everyday applications that all changed and managing the user interface became by far the largest part of most programs. Tools which simplified that aspect of application development were desperately needed and VB satisfied that requirement, taking the market by storm. As time has gone by I have detected a growing opinion amongst developers that tools such as VB make programming too easy, and there been a trend back towards complexity. I accept that changing fashions in user interface design can require greater control of what appears on the screen, such as rounded corners, circular windows and so on. That's fair enough, but there is no reason why those additional functions can't be delivered by building on the relative simplicity of user-friendly tools and easy-to-understand code syntax.

Maybe some programmers see simple development tools as a threat. They are not. A chisel is a simple tool to use but you need a skilled craftsman to get the best out of it. In much the same way there will always be a need for skilled programmers to develop applications of any real importance. 

I have experimented with Lazarus. This is another excellent development tool which has the advantage over Gambas of generating native executables and working cross-platform. Lazarus has a good form builder but it is hampered by being based on Pascal and exposing far more of its underlying complexity to the programmer. This provides greater scope for structural and coding errors and makes for more difficult debugging.

I still have a need to develop database applications on Windows from time to time. I use Access/VBA as my tool of choice, but I have noted how Microsoft has made the user interface more complex in recent versions, for no real functional gain. I suspect this is a move to make it look like a more serious tool. When I get back to developing on Linux using Gambas it is like a load being lifted from my shoulders.

Gambas is a tool which every serious developer should examine closely. Its biggest challenge is the mistaken notion which equates professionalism and functionality with complexity.

Nige 


 		 	   		  


More information about the User mailing list