TOM
 
Frequently Asked Questions
 
 
TOM Home
TOM Tasks

FAQ
News
Highlights
Publications
Documentation
Download TOM
TOM Software
Bug Database
Mailing Lists

Mail:
tiggr at gerbil.org

This is the TOM Programming Language FAQ, canonically located at http://gerbil.org/tom/faq. The TOM FAQ tries to answer many TOM questions. If you would like to see additional questions answered, don't hesitate to mail tiggr at gerbil.org.

  1. What is TOM?
  2. What does the name mean?
  3. What does TOM code look like?
  4. How does TOM compare to Java, C++, or <your favourite language>?
  5. How fast is TOM?
  6. Can TOM interface with other languages?
  7. Is TOM code embeddable into other programs?
  8. Can TOM connect with database systems?
  9. Can TOM speak CORBA?
  10. Where can I find the TOM FAQ?
  11. Under what license is TOM available?
  12. How do I debug an executable built by running make?

Short Cuts:
Tesla
TOM/Gtk
GP
MU

Snapshots:
all of 'em
tom [an error occurred while processing this directive]
tesla [an error occurred while processing this directive]
mu [an error occurred while processing this directive]
tomgtk [an error occurred while processing this directive]

Released:
all of 'em
tom 1.1.1
tomgtk 0.11
tesla 0.91
gp 0.5
mu 1.0

Misc:
GIF free NOW!

Answers

  1. What is TOM?

    TOM is an object-oriented programming language. At the same time, TOM is an implementation of that language, as available from http://gerbil.org/tom/.

    TOM allows the developer of the library to focus on the design instead of the features, since any missing features can be added by the library's users when needed. The user of a library will not be needlessly overwhelmed by a huge number of features. Instead, he will be able to concentrate on understanding the library's design, so he can use it well.

    To name a few features:

    • TOM sports extensibility of objects: a class is not just defined by its main definition: classes can be adjusted, even at run time. A prime example of this is to modify in your program a class offered by a shared library, just to make it suit your program better.
    • TOM methods employ default argument values and multi-valued returns;
    • TOM has multiple inheritance - with semantics much simpler than in C++ or Eiffel and obviating the need for interfaces (Java) or protocols (Objective-C);
    • TOM offers reflectivity on objects, their classes, member variables, and methods;
    • TOM discerns classes and a few basic types - like Java and Objective-C;
    • TOM has conditions modeled after CLOS conditions;
    • TOM, as compiled by Tesla, the first TOM compiler written in TOM, adds blocks to the language;
    • The TOM standard libraries offers time-constrained garbage collection, multi-threading, distributed objects.

  2. What does the name mean?

    The name TOM is a name. Names don't need to have a meaning. :)

  3. What does TOM code look like?

    Like this implementation of hello, world:

    int
      main Array arguments
    {
      [[[stdio out] print "hello, world"] nl];
    }
    
    or this little program to print the first 10 squares:
    int
      main Array arguments
    {
      int i;
    
      for (i = 1; i <= 10; i++)
        [[[stdio out] print (i, " * ", i, " = ", i * i)] nl];
    }
    

  4. How does TOM compare to Java, C++, or <your favourite language>?

    Syntactically, TOM resembles Objective-C. Semantically, it deviates from Objective-C in a way similar to Java. TOM code is compiled to object code that is linked to the TOM standard libraries. TOM does not depend on a virtual machine.

  5. How fast is TOM?

    TOM the language does not impose or imply any speed limits. TOM the implementation is similar in speed to the Objective-C implementation provided by GNU CC: all method invocations are dynamically bound and no inter-procedural optimizations are performed.

  6. Can TOM interface with other languages?

    A TOM method can be declared extern and subsequently implemented in C. Furthermore, with the currently available TOM compilers, which both compile TOM to C, TOM code may contain C code. It is like an

    asm ("ld r2, foo; st zero, [r2]");
    in C, written as
    <c> foo = 0; </c>
    in TOM.

  7. Is TOM code embeddable into other programs?

    It is very easy to write TOM code to be dynamically loaded. In addition, all that a program needs to do to be able to dynamically load TOM code is link with the TOM standard libraries. As a proof of concept, the Apache TOM Module enables Apache to be extended in TOM.

  8. Can TOM connect with database systems?

    The TOM DataBase Connectivity (TDBC) package provides a popular tabular database abstraction, as it is known from, for instance, Python and Java. Currently, PostgreSQL and MySQL is served, and adding support for additional databases should not prove difficult.

  9. Can TOM speak CORBA?

    An implementation of COBRA for TOM does not exist yet. However, given the refelective capabilities of TOM, a CORBA implementation for TOM would not be too difficult to implement.

  10. Where can I find the TOM FAQ?

    At http://gerbil.org/tom/faq.

  11. Under what license is TOM available?

    TOM is Open Source and Free Software: The TOM compilers and other tools are licensed under the GNU General Public License (GPL); the libraries under the GNU Library General Public License (LGPL). This means that (1) you can apply TOM for commercial applications---no strings attached---and (2) if you fix a bug in the TOM tools or libraries the rest of the world should share in that achievement.

    If you want a different license, or if you want to pay for commercial support, mail tiggr at gerbil.org.

  12. How do I debug an executable built by running make?

    The result of running make is normally not the executable proper, but a script that is created by libtool. That script does the shared-library magic needed to run the executable in-place. To actually debug the executable in-place, you need additional magic:

    libtool --mode=execute gdb ./yourapp

 
Copyright © 1997-2002 Programmers Without Deadlines