Download Tea Programming Language

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Tea Programming
Language
November 4 , 2015
Group 39
Syed Farooq Hassan,
Juan Antonio Hernandez,
Tea Programming Language
Tea is a high level language. It is combination of languages such as TCL, Java and Scheme. Tea
is designed and implemented by Jorge Nunes in 1997 who is working as Senior Software
Engineer in Intel Mobile Communication. Tea language came into existence to remove the
limitations of the different programming languages. It was created due to the shortage of
scripting languages for Java. It is used as scripting language in java. Tea also supports the
functional programming paradigm and considers its functions as first class objects. It has runtime
environment purely in java. It is also created for text formatting. It is a safer and better language
then java..
Work for Creation of this language was started in the mid of 1997. In that era there was no
scripting language which has interpreter that is written in java. After passing three years without
it, we had the languages such as python and TCL that has interpreter written in Java. Mostly
people believe that tea language has fulfilled its expectations and it has many advantages in the
field of software development.
It has syntax more over similar to language due to which it was created such as TCL and Scheme
but it has differences to these languages. Tea syntax is simpler as compared to these languages.
Tea is also strongly typed language. Just as in C language or any other language line is ended
with a semicolon but in the case of tea we usually different statements and they are separated by
semicolons. First sequence of strings will be the name of the function and then in later part of the
function are the arguments we pass in that function just as in the case of any other language. It
treats functions as objects. It also has servlet which supports the back end application which is
written in java.
There are different types of objects in tea. The object which separates itself from the other
objects is null object. It is different because it only has one instance. These objects are predefined
in the tea. The first object is “Symbols”. In symbol literal it does not start with a numeric value
or any white space rather it is in form of dollar sign or bracket .These symbols will be used to
show that this is variable. String literals are similar to the other languages of programming they
are in enclosed in the quotes. Tea also contains the integers and the floating point numbers. Tea
also contains the Boolean variables. Tea also contains the list in which sequence of words are
represented in the curly braces. Tea also contains the blocks of code in which you can write code
enclosed by the starting and ending brackets. As mentioned earlier the functions will be treated
as first class objects. In the null object there is no literal for null but “null” named variable is
present in Tea.
The major aim to design Tea was that it should be simple and its syntax is not complex for a
user. The designer made sure that everybody can learn and use it easily. Due to these things
language parser was also made simple and quite easy. If and foreach loop,as in other
programming languages are also allowed in tea language. There is no for or while loop in the Tea
language. It also supports multiple paradigm such as object oriented, functional and procedural
paradigm. Tea only supports single inheritance. As in any Object oriented language you have
classes and you define objects to access the variable and method of that class similar is in the
case of Tea programming language.
There are some features in Tea that are similar to java but some features differ. Break statement
are also used in tea language to get out from loops. Substitute statement is also used in Tea
which is used to substitute the code of the block. Variables in Tea language are not defined. Tea
follow the dynamic typing as its value can be changed afterwards. Tea language provides all kind
of arithmetic operations such as multiplication, division, division remainder and negations. The
order in which these operations are performed are similar to that of java. String operations are
similar to java, For example tea language also uses string concatenation operation. The
difference between java and tea string concatenation is that java uses plus operator for
concatenation whereas the Tea language uses the ampersand sign for the string concatenation
operation. Different data types can be converted to the string data type using the toString
function in Tea. Different types of operators are used for the equality and comparison tests.
Relational Test operations are also supported in Tea language. Equal and not equal signs are also
used to compare data in Tea. We can also use an equal function just as same in the java. We can
also do the comparison of greater than or smaller then in Tea. It is made easier using java
implementation. Comparison with objects can be done using the “compareto” function. Type
casting in tea can be done by using the “isa” operator. Logical operators can also be used such as
or, and or not. But we use the logical operators in different way as compared to java. Arrays can
be created in Tea language of any data type. Different APIs are also available to further increase
the simplicity. It also has ellipses parameter which is used there is a need of substitution in
template. The ellipses parameter is in this form “….”.
It does not use the java compiler, as templates in it will be directly converted to the Java byte
code. The line and the part of code which caused the runtime exception are showed in stack
trace. So it is easy to find the exceptions at run time. Dynamic and static Html pages can be
generated using Tea templates. As it is based on java, so it is also case sensitive language as java
is.
There also some differences of java and Tea. As in Tea there are reduced features as compared to
java. Primitive data types and objects are also supported in Tea. Variable can be passed in the
functions in Tea however they are of implicit type. There is no java compiler to execute the Tea
language. JRE of SUN can be used to execute the code.
Tea also contains some libraries and modules. The tea.html is used for generating the html. There
is also I/O library in Tea. It is used for input and output operations in Tea. Math library has
different function of mathematics in Tea. By using tea.net we can also use network programming
in Tea. Tea.string is used for the operations of string. Tea.tdbc is used for connection of
database. Tea.util is used to access utility classes and functions. Tea.xml is used for operation in
xml files. Tea.tos is used for the usage of tea object system. Tea.regexp supports regular
expression in Tea language. Tea.lists is used for processing of lists in Tea.
Different projects are also using the Tea programming language. There is I*Tea application
server which uses tea programming language. In routine we use online banking to pay our bills it
also uses Tea as programming language. There is also an online brokerage system which uses a
large database. It uses tea programming language in management tools. Walt Disney a famous
company known for its animation and cartoons is also using the tea language for their pages of
web. The famous cricketing website known as Espn Cricinfo also uses the tea programming to
embed data of player. For example there are different statistics of players in a cricket. The player
data will be posted in the web using the tea programming language. There are also some famous
websites such as Movies.com and Go.com which uses tea.
There are also some limitations of the Tea programming language. In it you cannot create the
data types or any kind of data. When you access the data, the accessed data cannot be changed in
any way. There are also less programming tools are provided in tea programming language but
most of the user uses it because of simple design. Users use it for good development practices
and an application which uses tea programming language are easier to control.
References
http://teatrove.sourceforge.net/docs/TeaTemplateLanguage.pdf
http://www.cs.tut.fi/~popl/2013/essays/tea.pdf
https://en.wikipedia.org/wiki/Tea_%28programming_language%29
http://www.pdmfc.com/tea/documentation.html
https://github.com/teatrove/teatrove/wiki/Tea-Template-Language
https://books.google.fi/books?id=dsU4LkGwk0C&pg=PA423&lpg=PA423&dq=how+tea+language+was+created&source=bl&ots=plEcL
6QmHU&sig=m2aCENpOrGI03uablceyztVGvZw&hl=en&sa=X&ved=0CC0Q6AEwA2oVCh
MIoLKiuvqyAIVpIdyCh2OaA1m#v=onepage&q=how%20tea%20language%20was%20created&f
=false
http://flylib.com/books/en/1.318.1.89/1/