Coder Social home page Coder Social logo

hopper's Introduction

GrassHopper

Build Status Coverage Status

DEPRECATED IN FAVOR OF JUST USING D.

GrassHopper is a programming language that aims to do what C++ does, but better. In other words, we aim to be to C++ what Kotlin is to Java.

Among the objectives of the language:

  • Fun to write
  • As expressive as C++ (ability to control low-level aspects)
  • Less dangerous than C++
  • Easier to write meta-programming
  • Relatively easy to learn (especially after C++).

Among the non-objectives:

  • Conceptually pure/beautiful language We're not trying to make a nice abstract language, but a down-to-earth, practical one that is fun to write.
  • Full memory safety We don't want the user to deal with the complexity of Rust's reference-borrowing.
  • Retro-compatibility This is a brand-new language, not C++++.

This language is still very much a work in progress. The grammar and list of features is likely to change a lot before it is stable.

Document with the features we would like to include: https://docs.google.com/document/d/1lScKPRK0yW46oty-ZUGUu_H-638nEmz5h-t-KyIqi9w/edit?usp=sharing

If you want to contribute, feel free to contact us! We are in need of developer workforce.

hopper's People

Contributors

nitnelave avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hopper's Issues

Add support for if/else

Note: if/else is an expression.

Needs:

  • Parser
  • Pretty-printer
  • Type checker (boolean condition)
  • Code generation (see IR phi nodes)

Add support for string literals

This includes lexing them, making an AST node, pretty-printing them, making a builtin type, and (possibly) generating IR.

Add support for declaring main entry point of program

Right now we can't decide which function is going to be the main entry point, we should:

  • decide a name of the entry point (main is the most common one I think),
  • assign in the IRBuilder the right entry point,
  • raise an alert if the entry point is not present ?

Add constness check

Add a visitor to make sure that "val" variables are not mutated in the context of the function/program.

Add support for pointers

Pointers are non-null, and can only (for now) be obtain by taking a reference.

Needs:

  • Parser (referencing, dereferencing)
  • Type checker
  • Code generation

Add support for macros

This is a major enhancement, and will come later in the development process.

Needs:

  • Lexing
  • Parsing
  • Name resolution
  • Macro expansion (recursive)

Add function overload resolution

The rules should be relatively similar to the C++ ones (ideally, simpler), with no implicit construction.

The allowed implicit conversions are:

  • pointer to child -> pointer to base
  • small int -> bit int
  • small float -> big float
  • int -> float

And that's it for now.

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.