{"id":13609576,"url":"https://github.com/objectionary/eo","last_synced_at":"2025-12-11T20:59:00.325Z","repository":{"id":36963779,"uuid":"73056727","full_name":"objectionary/eo","owner":"objectionary","description":"EOLANG, an Experimental Pure Object-Oriented Programming Language Based on 𝜑-Calculus","archived":false,"fork":false,"pushed_at":"2025-05-10T13:21:25.000Z","size":254986,"stargazers_count":1164,"open_issues_count":78,"forks_count":150,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-05-10T13:30:37.939Z","etag":null,"topics":["eolang","java","language","object-oriented","object-oriented-language","object-oriented-programming","oop","programming-language"],"latest_commit_sha":null,"homepage":"https://www.eolang.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/objectionary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-11-07T08:21:27.000Z","updated_at":"2025-05-10T10:24:43.000Z","dependencies_parsed_at":"2023-12-25T07:29:39.431Z","dependency_job_id":"4b2eb14e-d0d5-4613-bbc0-9ee475aa2f3d","html_url":"https://github.com/objectionary/eo","commit_stats":null,"previous_names":["yegor256/eo","cqfn/eo"],"tags_count":215,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Feo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Feo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Feo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Feo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/objectionary","download_url":"https://codeload.github.com/objectionary/eo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254079801,"owners_count":22011259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eolang","java","language","object-oriented","object-oriented-language","object-oriented-programming","oop","programming-language"],"created_at":"2024-08-01T19:01:36.110Z","updated_at":"2025-12-11T20:59:00.319Z","avatar_url":"https://github.com/objectionary.png","language":"Java","readme":"# Pure Object-Oriented Language, Experimental\n\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![DevOps By Rultor.com](https://www.rultor.com/b/objectionary/eo)](https://www.rultor.com/p/objectionary/eo)\n[![We recommend IntelliJ IDEA](https://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/)\n\n[![mvn-linux](https://github.com/objectionary/eo/actions/workflows/mvn.yml/badge.svg)](https://github.com/objectionary/eo/actions/workflows/mvn.yml)\n[![PDD status](https://www.0pdd.com/svg?name=objectionary/eo)](https://www.0pdd.com/p?name=objectionary/eo)\n[![Maintainability](https://api.codeclimate.com/v1/badges/eaede7d027b1d9411a76/maintainability)](https://codeclimate.com/github/objectionary/eo/maintainability)\n[![Maven Central](https://img.shields.io/maven-central/v/org.eolang/eo-parent.svg)](https://maven-badges.herokuapp.com/maven-central/org.eolang/eo-parent)\n[![codecov](https://codecov.io/gh/objectionary/eo/branch/master/graph/badge.svg)](https://codecov.io/gh/objectionary/eo)\n![Lines-of-Code](https://raw.githubusercontent.com/objectionary/eo/gh-pages/loc-badge.svg)\n[![Hits-of-Code](https://hitsofcode.com/github/objectionary/eo)](https://hitsofcode.com/view/github/objectionary/eo)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/objectionary/eo/blob/master/LICENSE.txt)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcqfn%2Feo.svg?type=shield)](https://app.fossa.com/reports/0ebb3149-4934-4565-bf6f-6fa41aed3b49)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/22dac7549c384692b79e02107de1d3c3)](https://www.codacy.com/gh/objectionary/eo/dashboard)\n[![Known Vulnerabilities](https://snyk.io/test/github/objectionary/eo/badge.svg)](https://snyk.io/test/github/objectionary/eo)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=com.objectionary%3Aeo\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=com.objectionary%3Aeo)\n\n**EO** (stands for [Elegant Objects][book] or ISO 639-1 code of [Esperanto])\nis an object-oriented programming language based on [𝜑-calculus].\nWe're aware of popular semi-OOP languages and we don't think\n  they are good enough, including: [Java], [Ruby], [C++],\n  [Smalltalk], [Python], [PHP], [C#].\nAll of them have something **we don't tolerate**:\n\n* types ([why?](https://www.yegor256.com/2020/11/10/typing-without-types.html))\n* static/class methods or attributes\n  ([why?](http://www.yegor256.com/2014/05/05/oop-alternative-to-utility-classes.html))\n* classes ([why?](http://www.yegor256.com/2016/09/20/oop-without-classes.html))\n* implementation inheritance\n  ([why?](http://www.yegor256.com/2016/09/13/inheritance-is-procedural.html))\n* mutability\n  ([why?](http://www.yegor256.com/2014/06/09/objects-should-be-immutable.html)\n  and\n  [why not?](https://www.yegor256.com/2016/09/07/gradients-of-immutability.html))\n* NULL ([why?](http://www.yegor256.com/2014/05/13/why-null-is-bad.html))\n* global scope\n  ([why?](https://www.yegor256.com/2018/07/03/global-variables.html))\n* type casting\n  ([why?](http://www.yegor256.com/2015/04/02/class-casting-is-anti-pattern.html))\n* reflection\n  ([why?](https://www.yegor256.com/2022/06/05/reflection-means-hidden-coupling.html))\n* scalar types and data primitives\n* annotations\n  ([why?](http://www.yegor256.com/2016/04/12/java-annotations-are-evil.html))\n* operators\n* traits and mixins\n  ([why?](https://www.yegor256.com/2017/03/07/traits-and-mixins.html))\n* flow control statements (`for`, `while`, `if`, etc)\n\n## Quick Start\n\nFirst, install [Java SE] and [npm].\n\nThen, install [eoc]:\n\n```bash\nnpm install -g eolang@0.33.4\n```\n\nThen, start with a simple EO program in the `app.eo` file:\n\n```eo\n# Just prints hello.\n[args] \u003e app\n  QQ.io.stdout \u003e @\n    \"Hello, world!\\n\"\n```\n\nCompile it like this (may take up to a minute or so):\n\n```bash\neoc --easy link\n```\n\nThen, run it:\n\n```bash\neoc --easy --alone dataize app\n```\n\nYou should see \"Hello, world!\" printed.\n\n## Simple Tutorial\n\nIn the example above, we create a new [abstract object][abstract objects]\nnamed `app`, which has a single attribute named `@`. The object\nattached to the attribute `@` is a copy of the object `stdout` with\na single argument `\"Hello, world!\"`. The object\n`stdout` is also [abstract][abstract objects].\nIt can't be used directly, a copy of it has to be created,\nwith a few required arguments provided.\nThis is how a copy of the object `stdout` is made:\n\n```text\nQQ.io.stdout\n  \"Hello, world!\\n\"\n```\n\nThe indentation in EO is important, just like in Python.\nThere must be two spaces\nin front of the line in order to go to the deeper level of nesting.\nThis code can also be written in a \"horizontal\" notation:\n\n```text\nQQ.io.stdout \"Hello, world!\"\n```\n\nMoreover, it's possible to use brackets in order to group arguments and avoid\nambiguity. For example, instead of using a plain string `\"Hello, world!\"`\nwe may want to create a copy of the object `stdout` with a more complex\nargument: a copy of the object `sprintf`:\n\n```eo\n# Says hello to Jeff.\n[] \u003e app\n  QQ.io.stdout \u003e @\n    QQ.tt.sprintf\n      \"Hello, %s!\"\n      * \"Jeffrey\"\n```\n\nHere, the object `sprintf` is also [abstract][abstract objects].\nIt is being copied with two arguments: `\"Hello, %s!\"` and `\"Jeffrey\"`.\nThis program can be written using horizontal notation:\n\n```eo\n+alias org.eolang.io.stdout\n+alias org.eolang.tt.sprintf\n\n# Also says hello to Jeff.\n[] \u003e app\n  stdout (sprintf \"Hello, %s!\" (* \"Jeffrey\")) \u003e @\n```\n\nThe special attribute `@` denotes an object that is being\n[decorated][composable decorators].\nIn this example, the object `app` decorates the copy of the\nobject `stdout` and through this starts to behave like\nthe object `stdout`: all attributes of `stdout` become the\nattributes of the `app`. The object `app` may have its own\nattributes. For example, it's possible to define a new abstract object\ninside `app` and use it to build the output string:\n\n```eo\n# Says hello to Jeff.\n[] \u003e app\n  QQ.io.stdout (msg \"Jeffrey\") \u003e @\n  [name] \u003e msg\n    QQ.tt.sprintf \"Hello, %s!\" (* name) \u003e @\n```\n\nNow, the object `app` has two \"bound\" attributes: `@` and `msg`. The attribute\n`msg` has an abstract object attached to it, with a single \"free\" attribute\n`name`.\n\nThis is how you iterate:\n\n```eo\n[args] \u003e app\n  malloc.for \u003e @\n    0\n    [x] \u003e\u003e\n      seq * \u003e @\n        x.put 2\n        while\n          x.as-number.lt 6 \u003e [i] \u003e\u003e\n          [i] \u003e\u003e\n            seq * \u003e @\n              QQ.io.stdout\n                QQ.tt.sprintf *1\n                  \"%d x %1$d = %d\\n\"\n                  x\n                  x.as-number.times x\n              x.put\n                x.as-number.plus 1\n        true\n```\n\nThis code will print this:\n\n```text\n2 x 2 = 4\n3 x 3 = 9\n4 x 4 = 16\n5 x 5 = 25\n```\n\nGot the idea?\n\n## Backus-Naur Form\n\nThis is our [EBNF] of EO language:\n\n![Grammar][EO-Grammar]\n\nThe PNG image was\n[auto-generated](https://github.com/objectionary/eo/actions/workflows/ebnf.yml).\nIt's better to use [ebnf/Eo.svg](https://www.eolang.org/ebnf/Eo.svg).\n\n## What's Next?\n\nJoin [our Telegram group](https://t.me/eolang_org).\n\nWatch [video](https://www.youtube.com/watch?v=QaKIw1Bh3Oc) about EOLANG basics.\n\nRead [our blog], especially the section with\n  [recently published papers][papers].\n\nLearn [XMIR], a dialect of XML, which we use to represent EO program:\n  [XSD] and [spec][XMIR HTML].\n\nSee the full collection of canonical objects: [objectionary][home].\n\nRead more about integration [with Maven][eo-maven-plugin].\n\n## Benchmark\n\nThis is how many milliseconds were spent on different XSL stylesheets\n  during the execution of `mvn install` of the `eo-runtime` module:\n\n\u003c!-- benchmark_begin --\u003e\n\n```text\nto-java.xsl              78929  41.08%\nclasses.xsl              60946  31.72%\nset-locators.xsl         14251  7.42%\nset-original-names.xsl   9729   5.06%\nattrs.xsl                7444   3.87%\ndata.xsl                 6765   3.52%\npackage.xsl              4721   2.46%\nanonymous-to-nested.xsl  4702   2.45%\ntests.xsl                4639   2.41%\n```\n\nThe results were calculated in [this GHA job][benchmark-gha]\non 2025-08-21 at 17:15,\non Linux with 4 CPUs.\nThe total is 192126 milliseconds.\nWe show only the first 16 most expensive XSL stylesheets.\n\n\u003c!-- benchmark_end --\u003e\n\nYou can run this benchmark locally with the following commands.\nFirst, to generate the `measures.csv` file:\n\n```shell\nmvn clean install --errors --batch-mode -Deo.xslMeasuresFile=measures.csv\n```\n\nThen, to generate the report:\n\n```shell\nawk -F ',' '{ a[$1]+=$2; s+=$2; } END { for (k in a) \\\n printf(\"%s.xsl\\t%d\\t%0.2f%%\\n\", k, a[k], 100 * a[k]/s)}' \\\n eo-runtime/measures.csv | sort -g -k 2 | tail -16 | column -t | head \"-16\"\n```\n\n## How to Contribute\n\nFork repository, make changes, then send us a [pull request][guidelines].\nWe will review your changes and apply them to the `master` branch shortly,\n  provided they don't violate our quality standards.\nTo avoid frustration, before sending us your pull request\n  please run full [Maven] build:\n\n```bash\nmvn clean install -Pqulice\n```\n\nYou will need [Maven] 3.3+ and [Java] 11+ installed.\nAlso, if you have [xcop] installed, make sure it is version `0.8.0`+.\n\n## Contributors\n\n[![contributors](https://contributors-img.web.app/image?repo=objectionary/eo)](https://github.com/objectionary/eo/graphs/contributors)\n\n## Special thanks\n\nWe are using the [YourKit Java Profiler]\nto enhance the performance of EO components:\n\n[![YourKit](https://www.yourkit.com/images/yklogo.png)](https://www.yourkit.com)\n\n[abstract objects]: https://www.yegor256.com/2020/12/01/abstract-objects.html\n[benchmark-gha]: https://github.com/objectionary/eo/actions/runs/17133812805\n[C#]: https://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29\n[C++]: https://en.wikipedia.org/wiki/C%2B%2B\n[composable decorators]: https://www.yegor256.com/2015/02/26/composable-decorators.html\n[EBNF]: https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form\n[eo-maven-plugin]: https://github.com/objectionary/eo/tree/master/eo-maven-plugin\n[eoc]: https://github.com/objectionary/eoc\n[guidelines]: https://www.yegor256.com/2014/04/15/github-guidelines.html\n[home]: https://github.com/objectionary/home\n[Java SE]: https://www.oracle.com/java/technologies/downloads/\n[Java]: https://en.wikipedia.org/wiki/Java_%28programming_language%29\n[Maven]: https://maven.apache.org\n[npm]: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm\n[our blog]: https://news.eolang.org\n[papers]: https://news.eolang.org/papers.html\n[PHP]: https://en.wikipedia.org/wiki/PHP\n[Python]: https://en.wikipedia.org/wiki/Python_%28programming_language%29\n[Ruby]: https://en.wikipedia.org/wiki/Ruby_%28programming_language%29\n[Smalltalk]: https://en.wikipedia.org/wiki/Smalltalk\n[xcop]: https://github.com/yegor256/xcop\n[XMIR HTML]: https://www.eolang.org/XMIR.html\n[XMIR]: https://news.eolang.org/2022-11-25-xmir-guide.html\n[XSD]: https://www.eolang.org/XMIR.xsd\n[YourKit Java Profiler]: https://www.yourkit.com/java/profiler\n[book]: http://www.yegor256.com/elegant-objects.html\n[𝜑-calculus]: https://arxiv.org/abs/2111.13384\n[Esperanto]: https://en.wikipedia.org/wiki/Esperanto\n[EO-Grammar]: https://raw.githubusercontent.com/objectionary/eo/gh-pages/ebnf/Eo.png\n","funding_links":[],"categories":["Java","Uncategorized","JVM语言"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectionary%2Feo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobjectionary%2Feo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectionary%2Feo/lists"}