EC (programming language)

eCParadigm| Multi-paradigm: procedural, object-oriented, generic

|

Designed by| Jérôme Jacovella-St-Louis
First appeared| 2004; 22 years ago (2004)
Stable release|

Ecere SDK 0.44.15 / 4 August 2016; 10 years ago (2016-08-04)

Typing discipline| Static, nominative, partially inferred
Implementation language| eC
OS| Cross-platform
License| BSD-3
Filename extensions| .ec, .eh
Website| ec-lang.org
Major implementations
Ecere SDK
Influenced by
C, C++, Python

eC (Ecere C) is an object-oriented programming language, defined as a super-set of the C language.

eC was initially developed as part of the Ecere cross-platform software development kit (SDK) project.

The goals of the language are to provide object-oriented constructs, reflection, properties and dynamic modules on top of the C language while maintaining C compatibility and optimal native performance.[1][2][3][4][5][6]

eC currently relies on GCC or Clang to perform the final steps of compilation, using C as an intermediate language.[7] There are, however, plans to integrate directly with LLVM to skip the intermediate C files.[8]

eC is available as part of the `ecere-sdk` package in Debian/Ubuntu and other derived Linux distributions. A Windows installer also bundling MinGW-w64 is available from the main website. The free and open-source SDK including the eC compiler can also be built for a number of other platforms, including OS X, FreeBSD and Android.[9]

It is also possible to deploy eC applications to the web by compiling them to JavaScript through Emscripten, or to WebAssembly through Binaryen.

## Contents

* 1 Examples
* 1.1 Hello world
* 1.2 Graphical user interface
* 2 References
* 3 External links

## Examples

### Hello world

A "Hello, World!" program in eC:

class HelloApp : Application

void Main()

PrintLn("Hello, World!");

### Graphical user interface

A "Hello, World!" program programmed with a GUI:

import "ecere"

class HelloForm : Window

caption = "My First eC Application";
borderStyle = sizable;
clientSize = { 304, 162 };
hasClose = true;

Label label

this, position = { 10, 10 }, font = { "Arial", 30 },
caption = "Hello, World!!"

HelloForm hello { };

## References

1. ↑ "eC - Overview". http://ec-lang.org/overview/.
2. ↑ "Category:EC". 25 November 2015. http://rosettacode.org/wiki/Category:EC.
3. ↑ "新型的编程语言:eC". http://www.cnbeta.com/articles/61048.htm.
4. ↑ "About OOC - Similar Projects". https://ooc-lang.org/about/#similar-projects.
5. ↑ "devmaster - The Ecere SDK and eC go Open Source". pp. 12–25. http://devmaster.net/p/2177/the-ecere-sdk-and-ec-go-open-source.
6. ↑ "Software Developer's Journal Extra 2012/02 - Cross-Platform Development with the Ecere SDK". http://vincent.riviere.free.fr/articles/gcc-new-target/SDJ_Extra_02_01.pdf.
7. ↑ "Ubuntu Manpage: ecc - eC Compiler". http://manpages.ubuntu.com/manpages/wily/man1/ecc.1.html.
8. ↑ "GSOC 2015 Ideas - eC Compiler". http://ec-lang.org/ideas/compiler/#llvm.
9. ↑ "eC - Installation". http://ec-lang.org/install/.

## External links

* Ecere SDK
* GitHub Repository hosting the compiler and run-time library source code
* Debian Package
* 3D chess web app written in eC (requires WebGL)
* 100 Languages Quine Relay featuring eC
* Ecere Project on Launchpad
* Ecere Tao of Programming (eC Programmer's Guide)
* Try it online REPL

0.00

(0 votes)

|

Retrieved from "https://handwiki.org/wiki/index.php?title=EC_(programming_language)&oldid=3897723"