incr Tcl
{{Infobox programming language
| name = Itcl
| logo = 70px
| paradigm = multi-paradigm: object-oriented, functional, Imperative, event-driven programming
| year = 1993
| designer = [http://incrtcl.sourceforge.net/itcl/mmc/index.html Michael McLennan]
| developer = [http://incrtcl.sourceforge.net/itcl/mmc/index.html Michael McLennan]
| latest_release_version = Itcl4.1.1
| latest_release_date = {{start date and age|2017|12|21|df=yes}}
| typing = dynamic typing, everything can be treated as a string
| implementations =
| dialects =
| influenced =
| website = [http://incrtcl.sourceforge.net/itcl/ itcl] at SourceForge
| license = BSD-style
}}
incr Tcl (commonly stylised as
Overview
= Features =
== Namespace support ==
Itcl allows namespaces to be used for organizing commands and variables.
Example:
package require Itcl
itcl::class Toaster {
variable crumbs 0
method 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]
$toaster toast 2
== C code integration ==
Itcl (like Tcl) has built-in support for the integration of C code into Itcl classes.
See also
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.
External links
- [http://incrtcl.sourceforge.net/itcl/ Itcl/incr Tcl project page]
- [http://purl.org/tcl/package/itcl/ Tcl package site]
- [http://sf.net/projects/tclweb/ tclweb project] (there is a mailing list maintained at this site)
Category:Dynamically typed programming languages
Category:Tcl programming language family
{{prog-lang-stub}}