Liana

Liana is a C-like, interpretive, object-oriented programming language, class library, and integrated development environment designed specifically for development of applications for Microsoft Windows and Windows NT. Designed by Jack Krupansky of Base Technology, Liana was first released as a commercial product in August 1991. The language is designed to be as easy to use as BASIC, as concise as C, and as flexible as Smalltalk.

The Liana language is very similar to Java since both are based on C/C++. If you think you need Java to quickly develop GUI applications for Windows, check out Liana. It's not 100% compatible with Java, but for your application it may be close enough.

If you're looking for an embeddable extension language for your application, check out our other product, CodeScript, which may meet your needs if you think you need a Java interpreter.

Liana is somewhat similar to Java and was developed around the same time, in the early 1990's.  A description was published in the July 1992 issue of the C Users Journal.   Unlike Java, Liana and CodeScript support dynamic execution of source code scripts and evaluation of source code expressions.

The OOP syntax of C++ was chosen over the less familiar syntax of Smalltalk and Objective-C to appeal to C programmers and in recognition of C++ being the leading OOP language. The syntax is a simplified subset of C/C++. The semantics are also a simplified subset of C/C++, but extended to achieve the flexibility of Smalltalk. Liana is a typeless language (like LISP, SNOBOL and Smalltalk), which means that the datatypes of variables, function parameters, and function return values are not needed since values carry the type information. Hence, variables are simply containers for values and function parameters are simply pipes through which any type of value can flow.

Single inheritance, but not multiple inheritance, is supported. Memory management is automatic using a reference counting scheme.

Classes for dynamic arrays and associative lookup tables are included in the library. Over 150 classes and several hundred functions provide a high-level interface for windows, menus, dialogs, controls, bitmaps, keyboard, mouse, text, fonts, graphics, file I/O, DDE, MDI, multimedia, etc. External DLL functions can be called.

A related product, CodeScript, is an embeddable application scripting language. It is an implementation of Liana which can be called from C/C++ applications to dynamically evaluate expressions and statement sequences. This can be used to offer the end-user a macro/scripting capability or to allow the C/C++ application to be customized without changing the C/C++ source code.

Here's a complete Liana program which illustrates the flexibility of the language semantics and the power of the class library:

main
{
    // Prompt user for a string.
    // No declaration needed for "x" (becomes a global variable.)
    x = ask ("Enter a String");

    // Use "+" operator to concatenate strings.  Memory management for
    // string temporaries is automatic.
    // The "message" function displays a Windows message box.
    message ("You entered: " + x);

    // Now x will take on a different type.  The "ask_number" function
    // will return a "real" if the user's input contains a decimal point
    // or an "int" if no decimal point.
    x = ask_number ("Enter a Number");

    // The "+" operator with a string operand will automatically
    // convert the other operand to a string.
    message ("You entered: " + x);

    // Prompt user for a Liana expression.
    // Store it in a local variable (the type, string, is merely for
    // documentation.)
    string expr = ask ("Enter an Expression");

    // Evaluate the expression.  The return value of "eval" could be
    // any type.  The "source_format" member function converts any
    // value to its source format (e.g., add quotes for a string.)
    // The "class_name" member function return the name of the class
    // of an object/value.
    // Empty parens can be left off for member function calls.
    x = eval (expr);
    message ("The value of " + expr + " is " + x.source_format +
	" its type is " + x.class_name);
}

A full-featured Developer's Kit is available for $149, the royalty-free Distribution License is $495, Class Library Source Code is $295, and Full Source Code (including the Interactive Development Environment) is $1,600. Shipping is $5 for Domestic US Priority Mail (contact us for forms of shipment. Payment must be in advance by check in US funds drawn on a US bank or International Money Order.

A FREE evaluation version of Liana is available for download.

Please contact us with any questions or comments.


References:

Aitken, P. 1993. "Liana for Windows." [product review] PC TECHNIQUES, December/January. Product review.

Burk, R. 1991. "Liana: A Language For Writing Windows Programs." Tech Specialist [R&D Publications], September.

Hildebrand, J.D. 1992. "Liana v. 1.0." Computer Language, December. Product review.

Krupansky, J. 1992. "Liana: A Windows Programming Language Based on C and C++." The C Users Journal, July

Krupansky, J. 1994. "Writing a Multimedia App in Liana." Dr. Dobb's Journal, Winter Multimedia Sourcebook.

Valdes, R. 1993. "The Liana Programming Language." Dr. Dobb's Jornal, October.

Please contact us with any questions or comments.


Updated: January 30, 2006 08:58:48 PM -0500

Copyright © 2005 John W. Krupansky d/b/a Base Technology