Meat Language

 

Introduction

Meat is designed to be a very simple, high level and cross platform computer programming language for any with computer experience can learn and use.

Object Oriented

Based on the object oriented design of Smalltalk-80, the design is kept simple and easy to understand. Everything in the language is an object defining all parts of the language in a consistent way without any additional syntax to learn. The only actual keywords in the entire language are property, class, method and super. A list of some of the other features are:

Object subclass: Test.Suite as: {
  property _tests
  property _currentTest
  property _title

  # Create new test suite object.
  class method new {
    self newObject
    context return: self
  }

  # Initialization a new TestSuite object with
  # default values.
  method initialize {
    super initialize
    _tests = [List new]
    self setup
  }

  method title: title test: body {
    _tests append: [Test.Test title: title test: body]
  }
  ...
  • Loose run-time linking.
  • Single inheritance. With the loose run-time linking doesn’t make this restrictive.
  • All class and object properties are private. This black boxes all data, allowing developers to ensure data consistency.
  • All class and object methods are public.

Syntax or Grammar

The syntax, or grammar, is inspired by Tcl and is even further simplified. First of all the language is line oriented. One line one command.

This is command one
This is command two

Each part of the command is separated by white space.

object method
object methodValue: parameter
object methodValue: parameter1 Value2: parameter2

Square brackets execute a sub-command and get replaced by the results.

object methodValue: [object method]
object methodValue: result

result = [1 + 1]
result = 2

Cross Platform Bytecode

The programs get translated into a high level cross platform bytecode, that is executed by the meat virtual machine. The high level nature of the bytecode is for high performance execution and can be created on one platform and run identically on any other platform.

The unique part of meat is the compiler is a library, Grinder, of the language itself. IDE’s can load the compiler and skip a lot of code parsing. Also code objects can be serialized into object archives, instead of code having to be a plain text file. With the object frame work, documentation, test code, version code and more can be added to the serialize code objects.

Download

Current Version: Development
Git Repository: https://github.com/digitalcombine/meat