Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
TRAC (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Language description == TRAC is a purely text-based language β a kind of [[General-purpose macro processor|macro language]]. Unlike traditional ''ad hoc'' macro languages of the time, such as those found in assemblers, TRAC is well planned, consistent, and in many senses complete{{fact or opinion|date=October 2024}}. It has explicit input and output operators, unlike the typical implicit I/O at the outermost macro level, which makes it simultaneously simpler and more versatile{{vague|date=October 2024}} than older macro languages. TRAC is a text-processing language,<ref> David Walden. [http://walden-family.com/texland/macro-memories-v07.pdf "Macro Memories, 1964β2013"]. 2014. </ref> also called a string processing language.<ref> Carol Loeb Mir. [https://files.eric.ed.gov/fulltext/ED082489.pdf "A Comparison of String Handling in Four Programming Languages"]. 1972. </ref> Because of this the only data type available is a string of characters. Numbers are strings of digits, with integer arithmetic (without specific limits on maximum values) being provided through built-in ("primitive") functions which operate on their string representation. Arguably, one aspect of its completeness is that the concept of an error is limited to events like lack of file space and requesting expansion of a string longer than the interpreter's working storage; what would in many languages be described as illegal operations are dealt with in TRAC by defining a result (often a null string) for every possible combination of a function's argument strings. TRAC is, like [[APL programming language|APL]] or [[LISP]], an [[expression orientation|expression oriented]] language (in contrast to more typical [[procedure orientation|procedure-oriented]] languages) but, unlike APL, it completely lacks operators. In most respects, it is a case of pure [[functional programming]]. It has, in common with LISP, a syntax that generally involves the presence of many levels of nested parentheses. TRAC is [[homoiconic]]: that is, a TRAC program can be represented and manipulated within the TRAC language itself.<ref name="trac_paper"> {{cite book |first1=C.N. |last1=Mooers |author-link=Calvin Mooers |first2=L.P. |last2=Deutsch |author-link2=L. Peter Deutsch |chapter=TRAC, A Text-Handling Language |title=Proceeding ACM '65 Proceedings of the 1965 20th national conference |pages=229β246 |year=1965 |doi=10.1145/800197.806048 |s2cid=40013081 }} </ref><ref name="kay_thesis"> {{cite thesis |author-link=Alan Kay |first=Alan |last=Kay |url=http://www.mprove.de/diplom/gui/kay69.html |title=The Reactive Engine |type=PhD |year=1969 |publisher=University of Utah }} </ref><ref> Klaas van Schelven. [http://www.expressionsofchange.org/dont-say-homoiconic/ "Don't say 'Homoiconic'"]. </ref> The emphasis on strings as the single data type is so strong that TRAC provides mechanisms for handling the language's own syntactic characters either in their syntactic roles or like any other character, and [[self-modifying code]] has more the feel of a natural consequence of typical TRAC programming techniques than of being a special feature. The main inspiration for TRAC came from three papers by [[Douglas McIlroy]].<ref name="trac_paper"/><ref>[[Douglas McIlroy|McIlroy, M.D.]], Macro Instruction Extensions of Compiler Languages. CACM 3, No. 4 (1960), 214β220.</ref><ref>Eastwood, D.E. and McIlroy, M.D., Macro Compiler Modification of SAP. Bell Telephone Laboratories Computation Center, 1959.</ref><ref>McIlroy, M.D., Using SAP Macro Instructions to Manipulate Symbolic Expressions. Bell Telephone Laboratories Computation Center (1960)</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)