![]() |
Up | ![]() |
TOC | Index | |||
<< | < 1.1 Quick Overview | Up: 1 Euphoria Programming Language v4.0 | 1.3 What's new in 4.0? > | 2 Installing Euphoria >> |
1.2 Introduction
1.2.1 Yet Another Programming Language?
Euphoria is a very high-level programming language. It is unique among a crowd of conventional languages.
1.2.2 Euphoria delivers the expected features of a modern language
- Open source
- Free for personal and commercial use
- Produces royalty-free, stand-alone, programs
- Multi-platform -- Windows, OS X, Linux, FreeBSD, OpenBSD, NetBSD, ...
- Provides a choice of multi-platform GUI toolkits: IUP, GTK, wxWindows
- Syntax colored profiling, debugging and tracing of code
- Dynamic memory allocation and efficient garbage collection
- Interfacing to existing C libraries and databases
- Well-documented, lots of example source-code, and an enthusiastic forum
- Edit and run convenience
1.2.3 Euphoria is unique
What makes Euphoria unique is a design that uses just two basic data-types -- atom and sequence, and two 'helper' data-types -- object and integer.
- An atom is single numeric value (either an integer or floating point)
- A sequence is a list of zero or more objects.
- An object is a variant type in that it can hold an atom or a sequence.
- An integer is just a special form of atom that can only hold integers. You can use the integer type for a performance advantage in situations where floating point values are not required.
What follows from this design are some advantages over conventional languages:
- The language syntax is smaller -- and thus easier to learn
- The language syntax is consistent -- and thus easier to program
- Routines are more generic -- a routine used for strings may also be applied to any data structure
- A higher level view of programming -- because sequences encompass conventional lists, arrays, tables, tuples, ..., and all other data-structures.
- Sequences are dynamic -- you may create and destroy at will -- and modify them to any size and complexity
- It supports both static data typing and dynamic data typing.
1.2.4 Euphoria has qualities that go beyond the elegance of sequences
- Euphoria programs are considerably faster than conventional interpreted languages -- Euphoria makes a better website server
- Euphoria programs can be translated then compiled as C programs -- fast programs become even faster
- Euphoria lets you write multi-tasking programs -- independent of the platform you are using
- Euphoria has a coherent design -- Euphoria programmers enjoy programming in Euphoria
1.2.5 As a first programming language
- Easy to learn, easy to program
- No limits as to what you can program
- Euphoria programming skills will enhance learning other languages
1.2.6 As an extension to languages you already know
- A fast, flexible, and powerful language
- Euphoria, the language you will prefer to program in
1.2.7 But, my favorite language is ...
You will find that Euphoria programmers are also knowledgeable in other languages. I find that the more tools you have (saws and hammers, or programming languages) the richer you are. Picking the correct tool is part of the art of programming. It will remain true that some people can program better in their favorite language rather than an arguably superior language.
Give Euphoria a try, and discover why it has enthusiastic supporters.
1.2.8 Products
The Euphoria Interpreter is used to execute your code directly with no binding or compilation steps. Edit, run, edit, run.
The Euphoria Binder is used to create stand-alone programs by "binding" the Euphoria interpreter onto your source code.
The Euphoria Translator converts Euphoria-source into C-source. This allows Euphoria programs to be compiled by a standard C compiler to make even faster stand-alone programs.
You can freely distribute the Euphoria interpreter, and any other files contained in this package, in whole or in part, so anyone can run a Euphoria program that you have developed. You are completely free to distribute any Euphoria programs that you write.
1.2.9 Requirements
To run the Windows version of Euphoria, you need any Windows 95 or any later 32-bit version of Windows. It runs fine on XP, Vista, and Windows 7.
To run the Unix version of Euphoria you need a supported Unix platform (Linux, FreeBSD, NetBSD or OpenBSD) and GCC v4.x. Binary packages are available for various platforms and distributions which remove the need for GCC to be present.
To run the OS X version of Euphoria, you need an Intel based Mac.
1.2.10 Conventions used in the manual
Euphoria has multiple interpreters, the main one being eui.
- On Windows platforms you have two choices. If you run eui then a console window is created. If you run euiw then no console is created, making it suitable for GUI applications.
The manual will only reference eui in examples and instructions; the reader is left to choose the correct interpreter.
Euphoria runs on many platforms. When operating system specific issues must be described you will see these descriptions:
- Windows will be a general reference to a family of Microsoft Windows operating systems that includes 95/ME/98/XP/NT/Vista/7/.
! lines above run off right side of page You will see the constant WINDOWS used for Windows specific code.
- Unix will be a general reference to the family operating systems that includes Linux, FreeBSD, NetBSD, OpenBSD, Mac OS X, ... You will see the constant UNIX used for Unix specific code.
Directory names in Windows use \ separators, while Unix systems use /. Unix users should substitute / when they examine sample code. Hint: Windows users can now use / in directory names.
Operating system names are often trademarks. There is no intent to infringe on their owner's rights. Within a paragraph, Euphoria keywords (like atom or while) and program excerpts are written in a fixed font.
Samples of Euphoria programs will be syntax colored using a fixed font:
for i=1 to 10 do ? i end for -- this is a comment line -- above is a 'for loop' example
1.2.11 Discover Euphoria
For more information, visit OpenEuphoria.org, and be sure to join the active discussion forum.
1.2.12 Disclaimer
Euphoria is provided "as is" without warranty of any kind. In no event shall any authors of Euphoria or contributors to Euphoria be held liable for any damages arising from the use of, or inability to use, this product.