Magik (programming language): Difference between revisions

Content deleted Content added
No edit summary
Bender the Bot (talk | contribs)
m External links: HTTP to HTTPS for SourceForge
 
(13 intermediate revisions by 8 users not shown)
Line 1:
{{Short description|Object-oriented programming language}}
{{primary sources|date=January 2008}}
 
Line 68 ⟶ 69:
}, {:parent_object_a, :parent_object_b})
</pre>
This code fragment will define a new exemplar called <code>my_object</code> that has two slots (or fields) called <code>slot_a</code> (pre-initializedinitialised to 34) and <code>slot_b</code> (pre-initialised to "hello") that inherits from two existing exemplars called <code>parent_object_a</code> and <code>parent_object_b</code>.
 
===Comparison===
Line 94 ⟶ 95:
_endmethod
</pre>
It is convention to supply two methods <code>new()</code> (to create a new instance) and <code>init()</code> (to initializeinitialise an instance).
<pre>
# New method
Line 101 ⟶ 102:
_endmethod
 
# InitializeInitialise method.
_private _method person.init(name, age)
# Call the parent implementation.
Line 176 ⟶ 177:
</pre>
 
===Regular Expressionexpression===
Magik supports // regular expression syntax:
 
Line 192 ⟶ 193:
</pre>
 
===HTTP Librarylibrary===
Magik supports making HTTP or HTTPS requests via http library, see below examples:
 
Line 201 ⟶ 202:
</pre>
 
===Language Quirksquirks===
Because Magik was originally developed in England, methods in the core smallworld libraries are spelled using [[British English]]. For example:
 
Line 209 ⟶ 210:
Like other programming language Magik too has collections. They include the following:
*Simple Vector
*Rope - a [[dynamic array]]
*Rope
*[[Hash Table]]
*Property List
*Equality set
Line 226 ⟶ 227:
*[http://www.ge-energy.com/products_and_services/products/geospatial_systems_and_mobile_workforce/index.jsp Smallworld Product Suite Technology]
*[http://www.mdt.net/ MDT - Magik Development Tools] IDE for GE Smallworld GIS developers
*[httphttps://sourceforge.net/projects/magikcmpnts Open Source (SourceForge)]
*[http://lambda-the-ultimate.org/classic/message5839.html#5886 Language forum post on Magik]
*[https://archive.istoday/20061020015202/http://cfis.savagexi.com/pages/technical_paper_5 Technical Paper No. 5 - An Overview of Smallworld Magik]
*[http://www.magikemacs.com/page/6/ GE Smallworld, Emacs Extensions for Magik developers] {{Webarchive|url=https://web.archive.org/web/20160425011048/http://www.magikemacs.com/page/6/ |date=2016-04-25 }}
*[https://marketplace.visualstudio.com/items?itemName=siamz.smallworld-magik Visual Studio Code extension for Smallworld Magik programming language.]
 
{{DEFAULTSORT:Magik}}
[[Category:Class-based programming languages]]