Lasso Soft Inc. > Home

Programming Fundamentals

This section provides an overview of Lasso, the programming language which powers Lasso Server. If you are new to programming then you should read this section carefully.

Users who are familiar with other languages can bring themselves up to speed on Lasso by reading this section. Topics include types & objects, using literals and operators, calling methods, passing parameters and using return values.

Types and Objects

Introduces the fundamental concepts behind Lasso's type system. It describes what types and objects are and how they relate to each other. It describes how objects maintain state and how that state is manipulated through data members and member methods and how types can be extended through inheritance and traits.

Literals

A literal is an object directly inserted into code using a "special" syntax. Lasso supports string, boolean, integer, decimal, tag and staticarray literals. The method for using these literals is straight forward. For example, an integer literal is expressed, as one might expect, by simply using the numeric value in the source text.

Variables

A variable is a way of holding on to and referencing the result of an expression. A variable points to an object and permits that object to be saved and repeatedly used later. There are two types of variables: local variables and thread variables. The type of the variable defines its scope and the rules about using it. Each variable is given a name and that name is used to access the variable's value. A object which a variable points to can be changed, or reassigned, as described in the chapter Operators.

Operators

An operator is a special symbol that, combined with one or more operands, performs an operation using those operands and, generally, produces a value. Lasso supports the standard arithmetic operators and logical operators as well as numerous other useful operations. Operators can be unary, taking only one operand, binary requiring two operands, or ternary, in the case of the condition operator, requiring up to three operands.

Conditional Logic

Conditional logic makes a program tick. Sections of code can be skipped or repeated multiple times. Code can be executed in every repetition of a loop or every several repetitions. Complex decision trees can be created which execute code only under very specific conditions. Lasso supports a variety of operations for performing conditional logic.

Query Expressions

Query expressions allow the elements in arrays and other types of sequences to be easily iterated, filtered, and manipulated using a natural syntax which is reminiscent of SQL. A query expression can take each element in a sequence, manipulate it and produce a new sequence. Query expressions let a developer drill down into nested sequences.

Defining Methods

Methods are the fundamental process abstraction in many languages, including Lasso 9. Methods provide a means for encapsulating a series of expressions so that they can be called repeatedly as a group. Complex, multi-step tasks are best expressed as a group of related methods.

Defining Types

Types are the fundamental data abstraction concept in Lasso 9. Lasso is an object-oriented language, and every piece of data is an object and every object is of a particular type. A type is a particular layout of data combined with a particular set of methods. Types provide a means for encapsulating data with the collection of methods designed to modify that data in predetermined ways.

Defining Traits

Traits provide a way to define data types in a modular fashion. Each trait includes a set of reusable tag implementations along with a set of requirements which must be satisfied in order for the included tags to function properly.

Error Handling

Efficient and effective error handling are core principles of good programming. Lasso provides you with the tools and output to manage errors at all levels. From failed database searches to syntax error reporting - the Lasso processes can act redundantly to ensure that no errors will be missed.

Threading

Lasso has integrated support for running multiple threads. This allows Lasso to handle many application requests at the same time. Threading in Lasso is designed to be easy to use and safe. Threads can communicate with one another by sending object messages back and forth.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft