Seed7
Designed by | Thomas Mertes |
---|---|
First appeared | 2005 |
Stable release | 2023-05-29
/ 316 days ago[1] |
License | GPL, LGPL (for the runtime library) |
Filename extensions | .sd7, .s7i |
Website | seed7 |
Major implementations | |
open source reference implementation | |
Influenced by | |
Pascal, Modula-2, Ada, ALGOL 68, C, C++, Java |
Seed7 is an
Features
Seed7 supports the
Major features include:
- User defined statements and operators
- Abstract data types
- Templates without special syntax
- Object-oriented with interfaces and multiple dispatch
- Static typing
- May be interpreted or compiled
- Source code portability
- Runs under
Several programming language concepts are generalized:
- functiondefinitions take the form of constant definitions.
- Compile-time expressions can execute user-defined functions.
- Overloading and object-orientation (with multiple dispatch) are seen as common concepts. They just happen at different times: run time, respectively.
- Type names and type descriptions can be used as parameter and function result.
- Functions, which are executed at compile time, can be used to define objects.
- Templates are written as compile time functions with type parameters.
- .
- Parserand interpreter are part of the runtime library.
- UTF-32 Unicode support. This avoids problems of variable-length encodings like UTF-8 and UTF-16.
The Seed7 project includes both an
Libraries
Seed7 has many libraries, covering areas including
TLS library
Seed7 has its own implementation of Transport Layer Security.[6] The library includes AES and elliptic-curve cryptography.
Database abstraction API
Seed7 provides a library with a database independent API.[7] Programs can connect to MySQL, MariaDB, SQLite, PostgreSQL, Oracle, Open Database Connectivity (ODBC), Firebird, InterBase, IBM Db2 and SQL Server databases. Independent from the database prepared statements can be created, bind variables can be used, the statements can be executed and result sets can be fetched.
History
Seed7 is based on MASTER, an extensible programming language described in the diploma and doctoral theses of Thomas Mertes.
Extension mechanism
An extension includes two parts: a syntax definition, giving a template for the new syntactic form, and a standard Seed7 function, used to define the semantics.[2]
Syntax definition
The syntax definition uses the Seed7 Structured Syntax Description (S7SSD). A S7SSD statement like
$ syntax expr: .(). + .() is -> 7;
specifies the syntax of the +
->
describes the associativity: Binding of operands from left to right. With 7
the priority of the +
operator is defined. The syntax pattern .(). + .()
is introduced and delimited with dots (.
). Without dots the pattern is () + ()
. The symbol ()
is a nonterminal symbol and +
is a terminal symbol.[10] The S7SSD does not distinguish between different nonterminal symbols()
.
Semantic extension
The definition of the +
operator for complex numbers is just a function definition:
const func complex: (in complex: summand1) + (in complex: summand2) is func result var complex: sum is complex.value; begin sum.re := summand1.re + summand2.re; sum.im := summand1.im + summand2.im; end func;
References
- ^ Mertes, Thomas (29 May 2023). "New Seed7 Release 2023-05-29". Retrieved 29 May 2023 – via SourceForge.
- ^ a b Daniel Zingaro, "Modern Extensible Languages", SQRL Report 47 McMaster University (October 2007), page 16 (alternate link).
- ISBN 978-3-642-11446-5, Springer, 2010, page 166.
- ^ Stadfeld, Paul (1 April 2010). "The Quest for the Ultimate Cycle (includes a performance comparison between Python, Seed7 and C)". Archived from the original on 25 October 2013. Retrieved 19 August 2019.
- ^ Seed7 libraries
- ^ A Transport Layer Security (TLS) library written in Seed7
- ^ Database abstraction API
- ^ Mertes, Thomas, "Entwurf einer erweiterbaren höheren Programmiersprache", Diploma thesis Vienna University of Technology (1984).(Abstract)
- ^ Mertes, Thomas, "Definition einer erweiterbaren höheren Programmiersprache", Doctoral thesis Vienna University of Technology (1986).(Abstract)
- ^ David Gudeman (March 26, 2015), "The Seed7 Programming Language" (In Seed7 you can specify a syntax like this)
External links
- Official website - Homepage with FAQ, manual, screenshots, examples, library descriptions, benchmarks and a set of algorithms
- Mirror of the Seed7 Homepage
- Seed7 at GitHub
- Download Seed7 from its main repository at SourceForge
- Seed7 at Rosetta Code - Contains many Seed7 examples
- The Quest for the Ultimate Cycle explores the 3n+C extension of the Collatz Conjecture with Seed7 programs
- Blog by Remo Laubacher: Statically linked Linux executables with GCJ, Seed7 and haXe (2011)
- Blog by David Gudeman The Seed7 Programming Language (2015)
- A FreeBSD port / see also here, maintained by Pietro Cerutti
- An OpenBSD port, provided by Brian Callahan
- A Seed7 package for openSUSE/Fedora, (see also here or here)
- A discussion where Seed7 is described as language where new syntax can actually be defined by language users
- Seed7 at "Fossies" - the Fresh Open Source Software Archive