Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Nov 18, 2020
Jan 29, 2018
Dec 15, 2016
Dec 12, 2019
Nov 13, 2020
Nov 18, 2020
Nov 16, 2020

README.md

Donate via Zerocracy

EO principles respected here Managed by Zerocracy DevOps By Rultor.com We recommend IntelliJ IDEA

Build Status PDD status Maintainability Hits-of-Code License Lines of code Maven Central

EO (stands for Elegant Objects or ISO 639-1 code of Esperanto) is an object-oriented programming language. It's still a prototype. It's the future of OOP. Please contribute! By the way, we're aware of popular semi-OOP languages and we don't think they are good enough, including Java, Ruby, C++, Smalltalk, Python, PHP, C#: all of them have something we don't tolerate.

EO is not planning to become a mainstream language—this is not what we want. Our main goal is to prove to ourselves that true object-oriented programming is practically possible. Not just in books and abstract examples, but in real code that works. That's why EO is being created—to put all that "crazy" pure object-oriented ideas into practice and see whether they can work. It's an experiment, a prototype, a proof-of-concept.

If you want to contribute, please join our Telegram chat first.

Our Twitter tag is #eolang.

These things we don't tolerate:

  • static/class methods or attributes (why?)
  • classes (why?)
  • implementation inheritance (why?)
  • mutability (why?)
  • NULL (why?)
  • global variables/procedures
  • reflection
  • type casting (why?)
  • scalar types and data primitives
  • annotations (why?)
  • unchecked exceptions (why?)
  • operators
  • flow control statements (for, while, if, etc)
  • DSL and syntactic sugar (why?)

We want EO to be compilable to Java. We want to stay as close to Java and JVM as possible, mostly in order to re-use the eco-system and libraries already available.

We also want to have an ability to compile it to any other language, like Python, C/C++, Ruby, C#, etc. In other words, EO must be platform independent.

Quick Start

Here is a simple program that asks for a year and tells you whether it's leap or not:

+alias stdout org.eolang.io.stdout
+alias stdin org.eolang.io.stdin
+alias scanner org.eolang.txt.scanner

[args] > main
  [y] > leap
    or
      and
        eq (mod y 4) 0
        not (eq (mod y 100) 0)
      eq (mod y 400) 0
  and
    stdout "Enter a year:"
    stdout
      concat
        (scanner stdin).nextInt > !year
        " is a leap year?"
        leap year:y

More examples are here.

How to contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

$ mvn clean install -Pqulice

Troubleshooting

If after clean import from Maven, IDEA doesn't compile the project and shows errors about ProgramLexer is undefined:

  • Open Maven Projects window
  • Select eo-compiler
  • Right button
  • Generate Sources and Update Folders
You can’t perform that action at this time.