HotBasic

From Wikipedia, the free encyclopedia

HotBasic is an all-new object-oriented programming language based on the classic BASIC programming language. It can create GUI, console, and CGI applications in both Windows and Linux. Applications created with HotBasic are compiled directly into machine language as opposed to many other languages that are interpreted at runtime or compiled into an intermediate bytecode. This makes HotBasic programs much faster, smaller, and more efficient than equivalent programs written in languages that do not compile to machine language. Moreover, HotBasic applications are entirely standalone—they do not require installation, information from the Windows registry, any runtime engine, or any preexisting software framework. HotBasic is designed to be simple yet powerful. Fairly complex operations can be accomplished with only a few lines of code. HotBasic is a full-featured programming language that can be used to develop applications for business, science, and entertainment.


Contents

[edit] History

HotBasic was created and is still being expanded by James J. Keene, PhD., a professor of Neuroscience who, in the 1970s, used computer automation to connect brain outputs to computer inputs. It was during this period that Dr. Keene learned two programming languages—assembly and BASIC. In 2002, Dr. Keene needed a compiler to conduct some particle physics research experiments but could not find one that met his requirements. So he decided to write the compiler himself. The first version of HotBasic was released on May 29, 2003, and it quickly developed a loyal following. The current version of HotBasic is version 5.1.

[edit] Influences

According to the developer, HotBasic’s chief influences are Microsoft’s QuickBASIC and William Yu’s RapidQ. QuickBASIC introduced numerous new concepts to BASIC programming—including dot notation. RapidQ was an independent effort by a programmer named William Yu to deliver a compiler that employed the syntax of QuickBASIC and allowed developers to create GUI applications. In 2001, however, Yu sold the source code of RapidQ to REAL Software and development of the RapidQ compiler ceased. RapidQ is not a true compiler—it compiles source code to a bytecode that is interpreted at runtime. When Dr. Keene began work on HotBasic, he appreciated the clean, simple syntax of QuickBASIC and RapidQ and decided to use a similar syntax. As a consequence, existing RapidQ developers—most of whom were longing for an updated version of RapidQ—were able to switch over to HotBasic with a small learning curve. In fact, many RapidQ applications can be ported over to HotBasic with few, if any, modifications.


[edit] Features

Despite its small size and the fact that it was developed by one person, HotBasic is a surprisingly full-featured compiler. Below is a partial list of its features:

- True compilation to machine code
- Ability to generate CGI-type applications
- An FPU object designed to fully exploit the floating point unit of the processor
- Integrated support to access ODBC-compliant databases
- Support for the creation of Active X and COM components
- Ability to call external DLLs

Starting with version 5.1, HotBasic also supports multithreading across multiple processors.

Additionally, programmers using the Windows version of HotBasic can perform calls to the native Windows API and effectively extend the capabilities of the language without limitation.

[edit] Example Code

Below is an example of a simple GUI application that displays a simple form with a button on it. When the button is clicked, a “Hello!” message appears.

       DECLARE SUB SayHello
CREATE formAdd AS FORM
CREATE button1 AS BUTTON
TOP = 10
LEFT = 10
WIDTH = 50
ONCLICK = SayHello
END CREATE
END CREATE
formAdd.SHOWMODAL
END
SUB SayHello
SHOWMESSAGE "Hello!"
END SUB


[edit] Criticisms

One of the most often cited criticisms of HotBasic is its lack of certain native properties for certain objects. For example, LABEL objects do not have a native BORDERSTYLE property in HotBasic. This criticism is often countered by the argument that the most frequently used properties do exist natively. A more important counter argument is the fact that HotBasic allows the programmer to directly access the STYLE bit as a property, effectively allowing the programmer to set any property of the object allowed by the underlying windowing system.
Another criticism of HotBasic is its lack of an “official” drag-and-drop WYSIWYG integrated development environment (IDE). Several unofficial such IDEs exist, however. More importantly, many HotBasic developers contend that because of HotBasic’s simple syntax and its ability to create complex objects with just a few lines of code, not only is a visual editor not necessary, it can be counterproductive. Finally, also noteworthy is the fact that HotBasic IDE HotIDE has a Design Mode that displays form changes on-the-fly as the developer types code changes. This feature is referred to by the developer as "Type and Drop" rather than "Drag and Drop."


[edit] External Links

The Official Hotbasic Homesite: www.hotbasic.org