Giter Site home page Giter Site logo

easy's Introduction

easy

easy is a Java based programming language.

The aim of this project is to draft some of the thoughts that I gathered while programming with Java. I would like to experiment with a few features and see if any of my ideas work out in practice without breaking Java.

There are 4 design constraints:

  • Only 1 way interoperability is required: translated easy code must be usable from Java, but not the otherway
  • Keep the language as similar to Java as possible
  • While reducing it as much as possible
  • And to introduce new keywords only when it is absolutely necessary

Some of the features I would like to try out:

  • classes are always public
  • no new keyword, only classes can and classes must start with capital letter
  • void does not exist, instead of void, the class is used as return type
  • there are no constructors, except a default and a copy constructor provided by the language
  • all variables are private, but they are reachable through public getters/setters
  • setters/getters are automatically generated
  • default Shallow Immutablility
  • mutable keyword can allow mutability
  • in future true immutable might be introduced with the strict keyword
  • no inheritance, only interfaces
  • no null obviously
  • reference values default to default constructor

This project has a very simple interpreter, that can interpret a .easy file to a .java file, but it is very limited at the moment.

The current advantage, that a small code like this: https://github.com/ZoltanTheHun/easy/blob/master/src/main/resources/easysrc/immutabletriangle.easy

package easy;
class ImmutableTriangle{
    int a;
    int b;
    int c;

    public int circumference(){
        return a + b + c;   
    }
}

In easy this is used like this:

ImmutableTriangle().a(1).b(2).c(3).circumference();

In Java this is used like this:

new ImmutableTriangle().a(1).b(2).c(3).circumference();

easy's People

Contributors

zoltanthehun avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.