Commit Graph
9 Commits
Author SHA1 Message Date
José Valim b291bc3712 Remove public/private helpers in favor of defp.
We have two main reasons for this:

1) defmacro cannot be private and private/public gave a general
   feeling that we could simply mark macros as private;

2) public/private works poorly with quoting. Imagine a macro that
   wants to define some method as private:

     quote {
       private
       def foo, do: bar
     }

   This call to private would alter all the functions in the target
   module.

In order to solve 2), we would have to either allow private with a block:

    quote {
      private do
        def foo, do: bar
      end
    }

Or use `private(opts)`:

    quote {
      def foo, do: bar
      private foo: 1
    }

However, none of these approaches explicitly solves 1). That's why we decided
to go with a syntax similar to Clojure's `def-`: defp.

    quote {
      defp foo, do: bar
    }

There is no `defmacrop`, which solves 1), and the visibility always apply
only to the current function, solving 2).
2011-12-30 08:16:22 +01:00
José Valim ece7a55ee4 Nest ALL the modules. 2011-12-29 19:16:05 +01:00
José Valim cb645d466a Start IO module. 2011-12-29 13:39:11 +01:00
José Valim eb808f011b Show proper exceptions in IEX and CLI. 2011-12-29 13:25:17 +01:00
José Valim cb3e8b26e6 Halt baby, halt. 2011-12-28 22:26:31 +01:00
José Valim 987c46a7aa Attempt to get ExUnit running again. 2011-12-28 12:13:40 +01:00
José Valim 2ce415da44 Do not allow custom functions on records. 2011-12-27 18:25:32 +01:00
José Valim 80962a283f Fix wildcard. 2011-12-27 17:20:34 +01:00
José Valim b6da82f6e2 Bring Elixir CLI back. 2011-12-27 17:16:55 +01:00