Est. 1985 Beginner

Lexico

A Spanish-keyword teaching language from Medellín, Colombia, built to take beginners from their first algorithm to object-oriented programs on Microsoft .NET

Created by Fabián Ríos Castrillón and Fabio León Ruiz (Laboratorios Riosur.net E.U., Medellín)

Paradigm Object-Oriented, Imperative
Typing Declared (every object is declared as a cantidad, caracteres or a class)
First Appeared 1985 (design date given by its developers); public .NET compiler from about 2003
Latest Version Lexico 3.1 compiler (4 October 2014); web interpreter and Android transpiler 0.2.0 pre-alpha (June 2017)

Lexico is a teaching language from Medellín, Colombia, whose keywords are Spanish. Its name is an acronym for Lenguaje EXperimental Introductorio a la Computación con Objetos, roughly “experimental introductory language for computing with objects”. It was created by Fabián Ríos Castrillón and Fabio León Ruiz and published by their company, Laboratorios Riosur.net E.U. A first program in Lexico can be a single line, tarea muestre "Hola Mundo !". From there a beginner can move to classes, inheritance and event-driven Windows programs built on the Microsoft .NET class library, without changing languages. There is little sign that Lexico spread far beyond Colombian classrooms. Still, it is a good example of a non-English programming language built to teach, and its developers pointed to classroom studies to back their claims, which is unusual among small teaching languages.

History & Origins

A long gestation

Lexico’s own website says the language was “designed in 1985 and redesigned in 1992, 2002 and 2009” by Laboratorios Riosur.net. Wikidata and the Italian and Russian Wikipedia articles repeat these dates, but all of them trace back to that one statement. No independent document from the 1980s has been found. The earliest outside trace is a 1993 University of Antioquia research report by Fabián Ríos and colleagues, Evaluación de la Influencia del Lenguaje LEXICO y Creación de un modelo de su Comportamiento (“Evaluation of the influence of the LEXICO language and creation of a model of its behaviour”). A later paper cites it as having measured how the LEXICO compiler helped students in courses that begin computing “through sequential-imperative programming”. That pre-.NET Lexico is otherwise undocumented. According to an archived 2004 copy of the company’s “about” page, it had by then worked for 15 years on education research projects before presenting itself to the international community.

The encyclopedia catalogue lists Lexico as a 1989 logic-programming language for natural language processing. None of that fits the sources. No 1989 document turned up, and Lexico has always been an imperative, and later object-oriented, teaching language. The “logic” in its literature means lógica de programación, the Latin American curriculum term for basic algorithm design. Its “natural language” quality is just the Spanish keywords. This page uses the developers’ 1985 design date and says plainly that it is their claim.

riosur.net and .NET (2003)

The language’s public life began in 2003. That year riosur.net opened as a PHP-Nuke “vortal” for “the community of Lexico users”, with forums on getting started with algorithms, Lexico’s instruction types and simple examples. By then Lexico was described as “a didactic support for those starting out in object-oriented programming”, built “to operate on Microsoft’s .NET platform”. A Spanish Wikipedia article followed on 20 September 2003. By 2004 the site’s banner read Lexico de riosur.net: un lenguaje POO didáctico en español, “a didactic OOP language in Spanish”, and it offered the compiler as a download.

Versions 2.0, 3.0 and 3.1

Version 2.0 came in 2006. Version 3.0, whose compiler is dated 16 June 2009, was the big step. It could also produce executables for the .NET Compact Framework, so programs could run on Windows Mobile Pocket PCs, PDAs and smartphones, and the project moved to the domain lexico.mobi. Version 3.1, dated 4 October 2014, targets 64-bit Windows 7 and later. Spanish Wikipedia says it was tested for several years in a university course. In June 2017 two 0.2.0 pre-alpha experiments appeared: an interpreter that runs in a web browser and a transpiler that turns Lexico into Android 4.4+ apps. Those are the last releases.

Design Philosophy

Lexico is built on the idea that beginners should spend their time on algorithms, not on the grammar of an industrial language. The developers’ 2006 English page says Lexico lets students “experiment with the algorithms design without having to learn a language for months so they can see their creations”. To that end, “some elements of efficiency that are unnecessary in a training have been retreated” (that is, removed). The site’s motto is …el poder de lo simple…, “the power of the simple”.

The designers wanted beginners to be able to start either way round, with single algorithms first or with classes and objects first. The same compiler accepts both:

  • Bottom-up: write ever larger algorithms using a few command-like words (tarea, entre, copie, muestre, es ?, mientras), with no class in sight.
  • Top-down: start from classes and objects, including classes derived from the .NET Framework’s own Windows Forms types.

Even so, the language calls itself fully object-oriented: “all its elements that hold information are objects”.

Key Features

A small Spanish vocabulary

The feature list on lexico.mobi says any application can be written with only eight kinds of instruction. The keywords are Spanish words a student already knows:

LexicoMeaningRole
tareataska stand-alone algorithm (console/batch program)
los objetos ... son cantidadesthe objects … are quantitiesdeclare numeric objects
el objeto ... son caracteresthe object … is charactersdeclare a text object
entreinput (literally “enter”)read input
muestreshowwrite output
copie X en Ycopy X into Yassignment
es ... ? with si: / no:is …? yes/nodecision
mientras ... haga:while … doloop
incluyaincludebring in another .lx source file
clase ... derivada_declass … derived frominheritance

The two built-in classes are cantidad (quantity) and caracteres (characters). Their constant objects are verdadero, falso and nulo. Accented letters (áéíóúüñ) are allowed in names, upper and lower case are treated the same, layout is free-form, and the yes and no branches of a decision may be written in either order.

Code examples

The simplest program, from the Spanish Wikibooks tutorial:

1
tarea muestre "Hola Mundo !"

This test for whether a number is prime, also from the Wikibooks tutorial, shows declarations, input, nested decisions and a mientras loop:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*Determina si un número entero mayor que 1 es o no primo*/
tarea
{
los objetos número, i, raiz son cantidades
el objeto respuesta son caracteres
entre número
es número=2 ?
  si: copie "es primo" en respuesta
  no: es número%2 = 0 ?
         si:copie "no es primo" en respuesta
         no:{
            copie "es primo" en respuesta
            copie 3 en i
            copie número^(1/2) en raiz
            mientras i<=raiz & respuesta="es primo" haga:
              {
              es número % i >< 0 ?
                 si: copie "es primo" en respuesta
                 no: copie " no es primo" en respuesta
              copie i + 2 en i
              }
            }
muestre número, " ", respuesta
}

Note >< for “not equal”, ^ for powers, and & for logical “and”.

Classes, events and .NET

Lexico has classes, inheritance, polymorphic methods, private members, static members, events, namespaces and exception handling (ensaye/avise, “try”/“warn”). It can also reach “the approximately 7,000 definitions of the .NET platform”. So a beginner’s program can derive from Form, draw with GDI+ and respond to the mouse. This example from the 2009 Lexico Mobile site draws a rectangle wherever the user clicks:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
clase ventana derivada_de Form
{
publicos:
el objeto lápiz es un Pen(Color.Blue, 3)
los objetos x, y son cantidades
mensajes:
mi_controlador_de_pintura(entra objeto_enviador, entra chismoso es un PaintEventArgs)
{
el objeto graficador es un Graphics no_crear
copie chismoso.Graphics en graficador
graficador.DrawRectangle(lápiz, System.Convert.ToInt32(x), System.Convert.ToInt32(y), System.Convert.ToInt32(40), System.Convert.ToInt32(30) )
}
mi_controlador_de_ratón(entra nn, entra ch es un MouseEventArgs)
{
copie ch.X en x
copie ch.Y en y
ventana.Refresh
}
ventana
{
copie "Primera Glofito" en ventana.Text
ventana.manejador(sale "ventana.Paint", sale "mi_controlador_de_pintura")
ventana.manejador(sale "ventana.MouseDown", sale "mi_controlador_de_ratón")
}
}

Parameters are labelled by direction: entra (“comes in”) and sale (“goes out”), with the synonyms deme/doy (“give me”/“I give”). no_crear (“do not create”) declares a reference without making a new object. The compiler can build stand-alone .exe files or .dll libraries for desktop .NET or for .NET Compact Framework devices, and C# code can be embedded directly.

Replaceable keywords

The keywords are Spanish by default, but they can be replaced. The 2006 English page shows an include file mapping entre to read, tarea to algorithm, muestre to display and so on. With it, this loop can be written in English:

1
2
3
4
5
6
7
algorithm
{
the objects nat, N are amounts
read N
for nat from 1 until N do:
  display "number ", nat
}

Evidence from the Classroom

Lexico’s developers often said that research had “proven” it helps beginners. The published study is Sandra María Morales’s comparison of Lexico and C#, carried out around 2004 to 2005. She taught object-oriented programming in two 50-hour after-school courses (four hours a week for three months) to grade 10 and 11 students in Copacabana, a town near Medellín. The students came from seven schools and had never programmed before. The Lexico group (22 students) averaged 3.90 on the course’s written problem reports. The C# group (13 students) averaged 3.22. Both used the same grading scale, on which the scores ranged from 2.0 to 4.6. The Lexico group’s scores were also less spread out. A one-sided t-test that did not assume equal variances gave p ≈ 0.008. Morales concluded that Lexico led to more learning of object-oriented programming.

The study was small, the groups were not the same size, and Lexico’s own site published it. It is one classroom comparison, not a general benchmark of teaching languages.

Current Relevance

Lexico is effectively dormant. The last compiler is version 3.1 from 2014, and the 2017 web interpreter and Android transpiler never got past pre-alpha. The compiler and the .NET runtime were free to redistribute. No source code was published, though, and Spanish Wikipedia notes that the licence is unclear and that no single formal language definition exists. The compiler runs only on Microsoft’s .NET on Windows, which Wikipedia also flags as a problem for schools moving to Linux. lexico.mobi is still online, but its last date stamp is July 2020 and it now carries injected spam links. There is no Docker image.

Why It Matters

Most widely used teaching languages of the 1980s and 1990s used English keywords. Lexico is one of a small group of languages, alongside efforts in many other countries, that put the programming vocabulary in the learner’s own language. It also went further than most by linking a beginner’s first one-line tarea to a real industrial platform. A Colombian high-school student could write copie, muestre and mientras and still end up with a Windows Forms application or a Pocket PC program. It is also unusual for a language this small to have been evaluated in university research from 1993 and in a later controlled classroom comparison.

Timeline

1985
According to its developers, Lexico is first designed; they say it was redesigned in 1992, 2002 and 2009
1993
Fabián Ríos and colleagues complete a University of Antioquia research report, 'Evaluación de la Influencia del Lenguaje LEXICO y Creación de un modelo de su Comportamiento', on the language's effect on students in introductory programming courses
2003
Laboratorios Riosur.net launches riosur.net as a community portal for Lexico, now an object-oriented language whose compiler runs on Microsoft .NET; a Spanish Wikipedia article on the language is created on 20 September
2006
Lexico 2.0 is released; its example programs later had to be adapted to compile under version 3.0
2009
The Lexico 3.0 compiler (dated 16 June) adds output for the .NET Compact Framework, so the same programs can target Windows Mobile handhelds and smartphones; the project moves to lexico.mobi
2014
Lexico 3.1 (dated 4 October), built for 64-bit Windows 7 and later, becomes the last compiler release
2017
A browser-based Lexico interpreter and a Lexico-to-Android transpiler for Android 4.4+ are published as 0.2.0 pre-alpha builds (June)

Notable Uses & Legacy

Secondary schools in Copacabana, Antioquia

In a study run with the municipal educational resource centre (CREM), Universidad de Antioquia researcher Sandra María Morales taught object-oriented programming to grade 10 and 11 students from seven schools in parallel 50-hour Lexico and C# courses, and recommended Lexico for schools teaching programming

University of Antioquia research

The 1993 university project by Fabián Ríos and others evaluated Lexico's influence on students starting computing through sequential, imperative programming and built a model of the language's behaviour

University introductory programming courses

Lexico was aimed at CS1-style first courses, and Spanish Wikipedia says version 3.1 was tested for several years in a university course

Windows Mobile programming for beginners

Marketed on lexico.mobi as 'programación para Windows Mobile', Lexico 3.0 let students compile the same Spanish-language programs, including event-driven Windows Forms applications, for desktop .NET or for Pocket PC and smartphone devices running the .NET Compact Framework

Running Today

Run examples using the official Docker image:

docker pull
Last updated: