Back

ⓘ Magik (programming language)




                                     

ⓘ Magik (programming language)

Magik is an object-oriented programming language that supports multiple inheritance and polymorphism, and it is dynamically typed. It was designed and implemented in 1989 by Arthur Chance of Smallworld Systems Ltd. as part of Smallworld Geographical Information System. Following Smallworlds acquisition in 2000, Magik is now provided by GE Energy, still as part of its Smallworld technology platform.

Magik Inspirational Magik was originally introduced in 1990 and has been improved and updated over the years. Its current version is 5.2.

In July 2012, Magik developers announced that they were in the process of porting Magik language on the Java virtual machine. The successful porting was confirmed by Oracle Corporation in November of the same year.

                                     

1. Similarities with Smalltalk

Magik itself shares some similarities with Smalltalk in terms of its language features and its architecture: the Magik language is compiled into byte codes interpreted by the Magik virtual machine. The Magik virtual machine is available on several platforms including Microsoft Windows, various flavours of Unix and Linux.

Magik is console based and code can be modified on the fly even when an application is running. The console can also be used to execute Magik code and to see the results.

Compiled code is stored in a single file called an image file. Each image file holds the compiled byte-codes and the state of the session for example variable values when the image was last saved.

                                     

2. Language features

Comments

Magik uses the # token to mark sections of code as comments:

# This is a comment.

Assignments

Magik uses the < < operator to make assignments:

a < < 1.234 b < < b + a c < < "foo" + "bar" # Concat strings

For clarity, this notation is read as "a becomes 1.234" or "b becomes b plus a". This terminology separates assignment from comparison.

Magik also supports a compressed variation of this operator that works in a similar way to those found in C:

b + < < a # Equivalent to b < < b + a

To print a variable you can use the following command

a < < "hello" writea

Symbols

As well as conventional data types such as integers, floats and strings Magik also implements symbols. Symbols are a special token data type that are used extensively throughout Magik to uniquely identify objects. They are represented by a colon followed by a string of characters. Symbols can be escaped using the vertical bar character. For example:

                                     
  • character Illyana Rasputin Magik programming language an object - oriented language Magik fictional band in the film Rock On Magik One: First Flight, the
  • The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones
  • important programming languages by decade. Programming language Timeline of computing History of computing hardware History of programming languages Booth
  • implemented using the programming language G2 from Gensym alongside a Smallworld GIS application using the Magik programming language and an Oracle database
  • platform is based on three technologies: An object - oriented programming language called Magik that supports multiple inheritance, polymorphism and is dynamically
  • sequel The Price of Magik were bundled together with Lords of Time by Mandarin Software to create yet another trilogy: Time and Magik Lancelot was published
  • words, it copies a value into the variable. In most imperative programming languages the assignment statement or expression is a fundamental construct
  • the album The Optimist Magick by Ryan Adams on the album Cardinology Magik comics a fictional superhero appearing in publications by Marvel Comics
  • Nicolas Francisco Perez - Bannen Hunt Mysteries who, for his radio program Magik Radio try to prove that Max is a ghost, well away from Pola, who also
  • friend of Max. She attends Sherman s Daycare Center with her friend Magik She and Magik went into space when Max is bored in Sherman s Daycare center and
  • hard rock band The Boss band a South Korean boy band Boss album by Magik Markers, 2007 The Boss Diana Ross album 1979 The Boss Jimmy Smith album
  • Magma, Sunspot and Magik who reappeared at the X - Men s base after teleporting off into the future after the events of X - Infernus. Magik informs Cannonball