Incr Tcl

Last updated
Itcl
Tcl.svg
Paradigm multi-paradigm: object-oriented, functional, Imperative, event-driven programming
Designed by Michael McLennan
Developer Michael McLennan
First appeared1993
Stable release
Itcl4.1.1 / 21 December 2017;2 years ago (2017-12-21)
Typing discipline dynamic typing, everything can be treated as a string
Website itcl at sourceforge
Influenced by
Tcl, C++

incr Tcl (commonly stylised as [incr Tcl], and often abbreviated to itcl) is a set of object-oriented extensions for the Tcl programming language. It is widely used among the Tcl community, and is generally regarded as industrial strength [ citation needed ]. Its name is a pun on "C++". Itcl implementations exist as both a package that may be dynamically loaded by a Tcl application, as well as an independent standalone language with its own interpreter.

Contents

Overview

Features

Namespace support

Itcl allows namespaces to be used for organizing commands and variables.

Example:

package require Itcl      itcl::class Toaster {variable crumbs 0method toast {nslices}{if{$crumbs>50}{error"== FIRE! FIRE! =="}set crumbs [expr$crumbs+4*$nslices]}method clean {}{set crumbs 0}}itcl::class SmartToaster {inherit Toaster     method toast {nslices}{if{$crumbs>40}{clean}return[chain$nslices]}}set toaster [SmartToaster#auto]$toastertoast2

C code integration

Itcl (like Tcl) has built-in support for the integration of C code into Itcl classes.

Licensing

Itcl follows the same copyright restrictions as Tcl/Tk. You can use, copy, modify and even redistribute this software without any written agreement or royalty, provided that you keep all copyright notices intact. You cannot claim ownership of the software; the authors and their institutions retain ownership, as described in the "license.terms" files included in the standard distribution. For more information please see incrtcl.sourceforge.net/itcl/copyright.html.

See also

Related Research Articles

Java (programming language) Object-oriented programming language

Java is a general-purpose programming language that is class-based, object-oriented, and designed to have as few implementation dependencies as possible. It is intended to let application developers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but it has fewer low-level facilities than either of them. As of 2019, Java was one of the most popular programming languages in use according to GitHub, particularly for client-server web applications, with a reported 9 million developers.

Multiple inheritance is a feature of some object-oriented computer programming languages in which an object or class can inherit characteristics and features from more than one parent object or parent class. It is distinct from single inheritance, where an object or class may only inherit from one particular object or class.

Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991, Python's design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.

In computing, source code is any collection of code, possibly with comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source code. The source code is often transformed by an assembler or compiler into binary machine code that can be executed by the computer. The machine code might then be stored for execution at a later time. Alternatively, source code may be interpreted and thus immediately executed.

A Perl module is a discrete component of software for the Perl programming language. Technically, it is a particular set of conventions for using Perl's package mechanism that has become universally adopted.

Object Pascal is an extension to the programming language Pascal that provides object-oriented programming (OOP) features such as classes and methods.

In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by additional user-written code, thus providing application-specific software. It provides a standard way to build and deploy applications and is a universal, reusable software environment that provides particular functionality as part of a larger software platform to facilitate development of software applications, products and solutions. Software frameworks may include support programs, compilers, code libraries, tool sets, and application programming interfaces (APIs) that bring together all the different components to enable development of a project or system.

GNU Guile Scheme interpreter

GNU Ubiquitous Intelligent Language for Extensions is the preferred extension language system for the GNU Project and features an implementation of the programming language Scheme. Its first version was released in 1993. In addition to large parts of Scheme standards, Guile Scheme includes modularized extensions for many different programming tasks.

In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types, functions, and other entities in source code and documentation.

newLISP programming language

newLISP is a scripting language which is a dialect of the Lisp family of programming languages. It was designed and developed by Lutz Mueller. newLISP is free and open-source software released under the GNU General Public License, version 3 or later.

Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk GUI toolkit, and is Python's de facto standard GUI. Tkinter is included with standard Linux, Microsoft Windows and Mac OS X installs of Python.

GNATS bug tracking system

GNATS is the GNU project's issue-tracking software.

Coding conventions are a set of guidelines for a specific programming language that recommend programming style, practices, and methods for each aspect of a program written in that language. These conventions usually cover file organization, indentation, comments, declarations, statements, white space, naming conventions, programming practices, programming principles, programming rules of thumb, architectural best practices, etc. These are guidelines for software structural quality. Software programmers are highly recommended to follow these guidelines to help improve the readability of their source code and make software maintenance easier. Coding conventions are only applicable to the human maintainers and peer reviewers of a software project. Conventions may be formalized in a documented set of rules that an entire team or company follows, or may be as informal as the habitual coding practices of an individual. Coding conventions are not enforced by compilers.

OTcl usually refers to an object oriented extension of Tcl created by David Wetherall at MIT. It is used in network simulator (NS-2) and usually run under Unix environment. This was later extended into XOTcl.

Tk (software) GUI toolkit or framework

Tk is a free and open-source, cross-platform widget toolkit that provides a library of basic elements of GUI widgets for building a graphical user interface (GUI) in many programming languages.

Tkabber

Tkabber is a GPL instant messaging client for the XMPP protocol which uses the Tk toolkit for the GUI. It runs on anything to which Tcl/Tk is ported: almost any X-based system, Microsoft Windows, and Mac OS X.

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data, in the form of fields, and code, in the form of procedures. A feature of objects is that an object's own procedures can access and often modify the data fields of itself. In OOP, computer programs are designed by making them out of objects that interact with one another. OOP languages are diverse, but the most popular ones are class-based, meaning that objects are instances of classes, which also determine their types.

SmartDO is a multidisciplinary design optimization software, based on the Direct Global Search technology developed and marketed by FEA-Opt Technology. SmartDO specialized in the CAE-Based optimization, such as CAE, FEA, CAD, CFD and automatic control, with application on various physics phenomena. It is both GUI and scripting driven, allowed to be integrated with almost any kind of CAD/CAE and in-house codes.

Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful. Tcl casts everything into the mold of a command, even programming constructs like variable assignment and procedure definition. Tcl supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles.

References

incr Tcl from the Ground Up by Chad Smith, published in January 2000.

This is a complete reference manual for incr Tcl, covering language fundamentals, OO design issues, overloading, code reuse, multiple inheritance, abstract base classes, and performance issues. Despite its breadth, it follows a tutorial, rather than encyclopedic, approach. This book is out of print as of September 2004.