Liana




<language> A C-like, interpretive, object-oriented programming language, class library, and integrated development environment designed specifically for development of application programs for Microsoft Windows and Windows NT.

Designed by Jack Krupansky <[email protected]> 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 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 reference counting.

The library includes over 150 classes, for dynamic arrays, associative lookup tables, windows, menus, dialogs, controls, bitmaps, cursors, icons, mouse movement, keyboard input, fonts, text and graphics display, DDE, and MDI.

Liana provides flexible OOP support for Windows programming. For example, a list box automatically fills itself from an associated object.

That object is not some sort of special object, but is merely any object that "behaves like" an array (i.e., has a "size" member function that returns the number of elements, a "get" function that returns the ith element, and the text for each element is returned by calling the "text" member function for the element).

A related product, C-odeScript, 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);

The author explained that the "Li" of Liana stands for "Language interpreter" and liana are vines that grow up trees in tropical forests, which seemed quite appropriate for a tool to deal with the complexity of MS Windows!

It is also a woman's name.

["Liana for Windows", Aitken, P., PC TECHNIQUES, Dec/Jan 1993].

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

["Liana v. 1.0." Hildebrand, J.D., Computer Language, Dec 1992].

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

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

["The Liana Programming Language", R. Valdes, Dr Dobbs J Oct 1993, pp.50-52].



< Previous Terms Terms Containing Liana Next Terms >
LGN
lha
LHARC
lhs
li
Base Technology
C-odeScript
Liana
Liar
liar paradox
libg++
library
Library of Efficient Data types and Algorithms