Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-10-02 19:39:41 -0700 (Sun, 02 Oct 2005)
Revision: 7815
Log message:

      Updated Dll.om to use mutable variables.  This solution wraps
      the entire code into a single function.
      
      I've thought about the alternatives to capturing mutable variables,
      but I currently think that the no-capturing policy is the best.
      
      Arguments for:
          1. It is simple.
          2. It can always be circumvented with explicit initializers,
             for example:
      
                 mutable.X = foo
      
                 private.initialize() =
                     X = foo
      
                 public.g() =
                     println($"X = $(X)")     # fails if called out of scope of X
      
                 public.f() =
                     initialize()
                     println($"X = $(X)")     # prints "X = foo"
          3. Mutable variables *never* escape--this is very cool.
      
      Arguments against:
          1. Imperative programming is harder than functional, but it
             is not clear that the OMake solution is an optimum relative
             to the objectives.
          2. Performance relative to functional programming can be O(1) worse,
             because initializers may be needed.
          3. It is unlike other mainstream imperative languages, where
             mutable variables are often globally or statically-scoped.
      

Changes  Path
+4 -4 omake-branches/omake_0_9_7_ref/OMakefile
+50 -49 omake-branches/omake_0_9_7_ref/lib/parse/C/Dll.om
+1 -1 omake-branches/omake_0_9_7_ref/src/Makefile
+1 -1 omake-branches/omake_0_9_7_ref/src/Makefile.nt
Properties omake-branches/omake_0_9_7_ref/tests/dll/gtk
Added omake-branches/omake_0_9_7_ref/tests/dll/gtk/README.sh
Properties omake-branches/omake_0_9_7_ref/tests/dll/gtk/README.sh
+2 -2 omake-branches/omake_0_9_7_ref/tests/dll/gtk/Test.om
+1 -1 omake-branches/omake_0_9_7_ref/tests/dll/gtk/dll.c
Properties omake-branches/omake_0_9_7_ref/tests/dll/simple
Added omake-branches/omake_0_9_7_ref/tests/dll/simple/README.sh
Properties omake-branches/omake_0_9_7_ref/tests/dll/simple/README.sh
+3 -3 omake-branches/omake_0_9_7_ref/tests/dll/simple/Test.om
+1 -1 omake-branches/omake_0_9_7_ref/tests/dll/simple/dll.c