Ana is a Python, PHP, and C impressed dynamically typed scripting language

32
[favorite_button]
Ana is a Python, PHP, and C impressed dynamically typed scripting language
Advertisements

These extensions are large.

Welcome to Ana

Build Status

Ana is a Python, PHP, and C impressed dynamically typed scripting language that implements object-oriented programing along with imperativeness. Be taught extra.

Hello World code sample

Bytecode example.

This screenshot used to be produced by working:

ana --opcodes -c 'print(1);'

Compilation output

Constructing

  • git clone https://github.com/analang/ana
  • cd ana
  • affect
  • ana --version

Aspects

  • Virtual machine
  • source to bytecode compiler, intepreted by the VM
  • classes with single layered inheritance
  • dynamically sized arrays
  • built in hash map motivate
  • variadic capabilities
  • easy module system
  • built in varieties
  • exceptions
  • C primarily based runtime extension system
  • rubbish assortment
  • firstclass capabilities

Advertisements
import String;

class Logger 
{
    purpose Logger(buffered)
    {
      self._buffered = buffered;
      self._lines = [];
    }

    purpose log(fmt, ...args)
    {
      line = String.layout(fmt, args);

      if(!_buffered)
      {
        print(line); 
      }
      else 
      {
        self._lines.push(line);
      }
    }
}

logger = Logger(spurious);

logger.log("{}", "Welcome to Ana Lang v.0.0.1");

To shuffle this example, merely develop ana logger.ana at your shell of assorted. Label: Assemble obvious String.ana is located in the directory of logger.ana. It is located in the lib directory.

Read More
Fragment this on knowasiak.com to mediate recommendation from people on this subjectSignal in on Knowasiak.com now for individuals who are no longer registered yet.

Advertisements
Vanic
WRITEN BY

Vanic

“Simplicity, patience, compassion.
These three are your greatest treasures.
Simple in actions and thoughts, you return to the source of being.
Patient with both friends and enemies,
you accord with the way things are.
Compassionate toward yourself,
you reconcile all beings in the world.”
― Lao Tzu, Tao Te Ching
Get Connected!
One of the Biggest Social Platform for Entrepreneurs, College Students and all. Come and join our community. Expand your network and get to know new people!

Discussion(s)

No comments yet
Knowasiak We would like to show you notifications so you don't miss chats & status updates.
Dismiss
Allow Notifications