ELite is an object-oriented programming language that combines functional style and imperative style programming. It has features of functional languages such as first-class functions, list-comprehension, pattern-matching, and lazy-evaluation, etc., as w
Be the first to post a text review of ELite. Rate and review a project by clicking thumbs up or thumbs down in the right column.
Major features of Elite v0.5.0 * Fixed lots of bugs. * Support scripting API. * Powerful XML Literals support, see samples/xml.xel * Add the reference of ELite Language
How to run Elite examples: 1. download ELite from http://sourceforge.net/projects/aom-elite, the lastest version is 0.2. 2. unzip elite-${version}.zip into a dictionary, for example /usr/local/elite-${version} 3. run elite.sh #cd /usr/local/elite-${version}/bin #./elite.sh ../samples/dsl.xel #./elite.sh ../samples/list.xel Major features of Elite v0.2 * Strong DSL ability. User can use it as a domain specific language whose grammar is more similar to nature language. define syntax { Convert :amount :from into :to => :amount[:from] -> :to } print(Convert 25 DEM into ECU); Output12.782297029905463 ECU * Powerful list evaluation, for example: /*Quick sort algorithm*/ define qsort(ls) { : [] => [] : [x:xs] => qsort([y where y in xs, y < x]) + x + qsort([y where y in xs, y >= x]) } define lst = shuffle([1..10]); print(lst); print(qsort(lst)); Output [9, 4, 3, 5, 8, 2, 6, 7, 1, 10] [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] * Strong definition and deduction ability /* Formula expression */ require 'function'; define f = (:x + 1) * (:x - 1) f(5) Output24 f(f) Outputx4 - 2x2 f(f)(5) Output: 575 /* Logical deduction by simple describing definition */ Baker, Cooper, Fletcher, Miller, and Smith live in the different levels of a 5-floor apartment respectively. Backer is not in the top level. Cooper is not in the ground level. Fletcher is in neither the top nor ground. Miller lives exactly one floor higher than Cooper. Smith is not next to Fletcher and Fletcher is not next to Cooper. Question: Who lives in which floor? define multiple_dwelling = [ {baker:baker, cooper:cooper, fletcher:fletcher, miller:miller, smith:smith} where baker in [1..5], cooper in [1..5], fletcher in [1..5], miller in [1..5], smith in [1..5], distinct([baker, cooper, fletcher, miller, smith]), baker != 5, cooper != 1, fletcher != 5, fletcher != 1, miller > cooper, abs(smith - fletcher) != 1, abs(fletcher - cooper) != 1 ] define distinct(items) { : [] => true : [x:xs] => x not in xs and distinct(xs) } print(multiple_dwelling); Output: [{'baker':3, 'cooper':2, 'fletcher':4, 'miller':5, 'smith':1}]
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?
Thanks for your review!
Get credit for your review by logging in via OpenID. Click your account provider: