Emerald:Emerald is a language I have theorized for a long time. I have finally decided to make this
my primary project! I choose to present it here cautiously, not because there's competition
but rather due to the entirely new form of syntax and ideals it portrays. An example of the
syntax:
~seep classpath
define ostack Felines further
accept Cat, etc
expand
/further
define type Cat further
String Name null
define creator Cat void (String Name) futher
set Name
/further
define action Meow void () further
pusln("Meow".."/n")
/further
/further
generate from Felines Cat("Mimo")
Felines.entry[0].Meow #ouputs Meow :P
ostacks are a main feautre of emerald. Ostcks are object stacks, which essentially hold
unnamed objects in an indexed format. This is one theory I thought HAD to be included, and
is really awesome because to create a new one all you have to do is use 'generate' and say
which stack you add it to. The stacks can be set to accept only certain types, but the
'etc' commands allows for you to later define types that can be inserted into the stack.
Everything in the stack inherits traits from a higher class -- but I didn't use it ion this
example.
Weird concept, but I personally think it's awesome. That's just one of the surprises in Emerald Coding -- other features include:
- compiles to interpretable bytecode
- full support for object oriented programming
- new additions to the original object oriented approach
- very user-friendly syntax
- easy to learn new concepts that extend modern OOP
- low benchmarks for easy VM translation
- interpretable bytecode can be run at speeds similar to Java and other non-direct compiled languages
- very small program size
One thing that may seem trivial at first is the use of object stacks to hold similar types (Emerald name for classes). Stacks can have a mainframe type that all objects in the stack inherit properties from. This allows for easy inheritance that can be applied at any time to specific objects.
All attributes of an object in Emerald are hidden and must be accessed through actions (methods). Example:
generate from Felines Cat(3) # 3 == age
int KittyAge Cat.Age #illegal
int KittyAge Cat.GetAge() #legal
int KittyAge (generate from Felines Cat(3)) #even better!
[More info later]
VixenVMA low-level minimalistic VM for interpreting Emerald Bytecode! Includes minimal GC, threading control, and forwards compatibility with higher-level VM implementation methods!
Features include:
- multi-threading (up to 256 threads at one time)
- program-denoted garbage collection
- preloading of bytecodes to ensure speed while interpreting
- minimalistic design for implementations on lesser technologies
[More info later]