Glagol
From Wikipedia, the free encyclopedia
Glagol (Russian Глагол, "verb") is a programming language based on Russian lexicon. It is strongly reminiscent of Oberon and Pascal. The language is the subject of serious academic study and is under active development. The complete distribution includes, along with the compiler, a set of mathematical and system libraries, games and applications with source code attached.
Contents |
[edit] Features
- Usage of Russian keyword is believed to make language easier to understand. These keywords are often different from those usually used to describe programming languages but they are closer to everyday speech.
- Language is based on Oberon and therefore almost all the features of this language are present.
- There is big support for console programmes, which are widely used in education. All strings are automatically converted into OEM encoding with output procedures.
- There is a simple console GUI present.
- Debugging is possible (using Microsoft Visual Studio).
[edit] Problems
- Console output. All existing functions use console output, and simple GUI is also console. It is still possible to use pure Windows API though.
- Lack of modern GUI. Supplied IDE (Оболочка) is too simple for serious use. Use of FAR manager and batch command file Построить.bat is suggested for the program compilation. It is also possible to use Microsoft Visual Studio as a GUI, but debugging is the only supported advanced feature there.
- Typing texts can sometimes require switching between different keyboard layouts because not all Russian keyboard layouts contain characters []<>{}|# that are used in Glagol (the one used in Windows 98 does use Alt key for this, the one used in Windows XP doesn’t and Alt key is used for inserting characters by their number instead). Using of modern IDE can be a solution to this problem.
Of course, these problems can be eliminated as the compiler development goes on.
[edit] Terminology
Terminology, used in Glagol, is different from the one used to describe most programming languages. While being closer to everyday speech, it may confuse those who want to learn Glagol already knowing other programming language.
Glagol term | Direct translation | Traditional term | English term |
---|---|---|---|
вид (vid) | kind | тип (tip) | type |
данное (dannoye) | datum | переменная (peremennaya) | variable |
действие (deystvie) | action | операция (operatsia) | operation |
доступ (dostup) | access | указатель (ukazatel) | pointer |
задача (zadacha) | task | процедура (protsedura), функция (funktsia) | procedure, function |
ключ (kluch) | key | логическая переменная (logical variable) | boolean variable |
набор (nabor) | set, collection | запись (zapis'), структура (struktura), объект (obyekt), класс (klass) | record, structure, object, class |
название (nazvanie) | name | идентификатор (identifikator) | identifier |
отдел (otdel) | section | модуль (modul') | unit, module |
пояснение (poyasnenie) | explanation | комментарий (kommentariy) | comment |
преобразователь (preoprazovatel) | transformator | компилятор (kompilator) | compiler |
приёмник (priyomnik) | receiver | параметр (parametr) | parameter |
ряд (r'ad) | row | массив (massiv) | array |
тексторез (tekstorez) | text cutter | препроцессор (preprotsessor) | preprocessor |
уборка памяти (uborka pam'ati) | memory cleanup | сборка мусора (sborka musora) | garbage collection |
указание (ukazanie) | instruction | оператор (operator) | operator |
цепочка (tsepochka) | (small) chain | строка (stroka) | string |
[edit] Example of the program on Glagol
«Hello world»:
ОТДЕЛ Привет+; ИСПОЛЬЗУЕТ Вывод ИЗ "...\Отделы\Обмен\"; УКАЗ Вывод.Цепь("Здравствуй, мир!") КОН Привет.