Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnglishScript should be translated into the π programming language #4

Open
jarble opened this issue Feb 3, 2016 · 0 comments
Open

Comments

@jarble
Copy link
Collaborator

jarble commented Feb 3, 2016

Today, I found a programming language called π that has implemented many of the features of EnglishScript. π has an extensible syntax, so it should be very easy to convert EnglishScript source code into π source code and vice-versa.

From π's official website is an example of a pattern that can be defined. This is very similar to EnglishScript's pattern definition syntax:

declare_pattern
   integer_potentiation ≔
   integer:i %W- "^" %W- integer:j
   ⇒ integer ➞
   {
      int result = i;
      for (int k = 1; k <= j-1; k++)
         result *= i;
      return result;
   };

The name of this pattern is integer_potentiation, the type of the pattern is integer, and the parameters are integer:i and integer:j.
This link shows another example of π's extensible syntax, which makes it an ideal target language for EnglishScript.

@jarble jarble changed the title Can EnglishScript be translated into the π programming language? EnglishScript should be translated into the π programming language Feb 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant