summary refs log blame commit diff stats
path: root/web/question.txt
blob: ffa26a364cd1af24e74d4e3b5853718ccc9c1956 (plain) (tree)


















                                                                                







                                                                          


                                                                       
                                            

 


                                     
                                                                             
                                                                    

                       













                                                                                










                                                                            
                                                                             
                                                                            
                                                                      
                                                                              
                                                                         


                                                                      

 

                   



                                                                           

 







                                                                             


           











                                                                            








                                                                               


                                                                            
































                                                                              
 
 
===========================================
         Questions and Answers
===========================================


General
=======

What is Nimrod?
---------------

Nimrod is a new statically typed, imperative
programming language, that supports procedural, functional, object oriented and
generic programming styles while remaining simple and efficient. A special
feature that Nimrod inherited from Lisp is that Nimrod's abstract syntax tree
(*AST*) is part of the specification - this allows a powerful macro system which
can be used to create domain specific languages. Nimrod does not sacrifice
flexibility for speed. You get both.

..
  Don't give me that marketing crap. What is Nimrod?
  --------------------------------------------------

  Nimrod = Mutable value based datatypes + static binding + sugar to make 
    this programming modell as convenient as possible


Why is it named Nimrod?
-----------------------
You have to find out for yourself. If you don't find a tongue-in-cheek 
interpretation you will have to look harder.


Why yet another programming language?
-------------------------------------

Nimrod is one of the very few *programmable* statically typed languages, and 
one of the even fewer that produces native binaries that require no 
runtime or interpreter.


What is Nimrod's take on concurrency?
-------------------------------------

Nimrod primarily focusses on thread local (and garbage collected) heaps and 
asynchronous message passing between threads. Each thread has its own GC, so no 
"stop the world" mechanism is necessary. An unsafe shared memory heap is also
provided. 

Future versions will additionally include a GC "per thread group" 
and Nimrod's type system will be enhanced to accurately model this shared
memory heap.


How is Nimrod licensed?
-----------------------

The Nimrod compiler is GPL licensed, the runtime library is LGPL licensed.
This means that you can use any license for your own programs developed with
Nimrod. If I receive enough requests with good arguments, I may change the
license of Nimrod to the BSD license.

How stable is Nimrod?
---------------------

The compiler is in development and some important features are still missing.
However, the compiler is quite stable already: It is able to compile itself 
and a substantial body of other code. Until version 1.0.0 is released,
incompatibilities with older versions of the compiler will be introduced. The 
semantic details of overloading, macros/templates/generics and iterators 
and their interactions are subject to change. Changes to the syntax
are also planned; gone will be the distinction between expressions and
statements.


How fast is Nimrod?
-------------------
Benchmarks show it to be comparable to C. Some language features (methods, 
closures, RTTI) are not yet as optimized as they could and will be.
The only overhead Nimrod has over C is the GC which has been tuned 
for years but still needs some work.


What about JVM/CLR backends?
----------------------------

A JVM backend is almost impossible. The JVM is not expressive enough. It has
never been designed as a general purpose VM anyway. A CLR backend is possible
but would require much work. 


Compilation
===========

Which option to use for the fastest executable?
-----------------------------------------------

For the standard configuration file, ``-d:release`` does the trick.


Which option to use for the smallest executable?
------------------------------------------------

For the standard configuration file, ``-d:quick --opt:size`` does the trick.


Execution of GCC fails (Windows)
--------------------------------

On Windows the configuration file ``config\nimrod.cfg`` assumes that GCC is in 
``$nimrod\dist\mingw\bin``: This is where the Windows installer puts GCC.  
If you delete the line ``gcc.path = r"$nimrod\dist\mingw\bin"``, Nimrod uses 
the GCC from your ``PATH`` environment variable. 

If you cannot modify ``$nimrod\config\nimrod.cfg``, copy 
``$nimrod\config\nimrod.cfg`` to ``%APPDATA%\nimrod.cfg`` and modify 
``%APPDATA%\nimrod.cfg`` instead. To determine what ``%APPDATA%`` means for 
your Windows account, use the shell command::

  echo %APPDATA%



How do I use a different C compiler than the default one?
---------------------------------------------------------

Edit the ``config/nimrod.cfg`` file.
Change the value of the ``cc`` variable to one of the following:

==============  ============================================
Abbreviation    C/C++ Compiler
==============  ============================================
``dmc``         Digital Mars C++
``wcc``         Watcom C++ (now unsupported!)
``bcc``         Borland C++ (now unsupported!)
``vcc``         Microsoft's Visual C++
``gcc``         Gnu C
``pcc``         Pelles C (now unsupported!)
``lcc``         Lcc-win32 (now unsupported!)
``tcc``         Tiny C
``llvm_gcc``    LLVM-GCC compiler
``icc``         Intel C++ compiler
``ucc``         Generic UNIX C compiler
==============  ============================================

If your C compiler is not in the above list, try using the
*generic UNIX C compiler* (``ucc``). If the C compiler needs
different command line arguments try the ``--passc`` and ``--passl`` switches.
Unsupported compilers contain serious bugs that keep them from bootstrapping
Nimrod.