Commit Graph
97 Commits
Author SHA1 Message Date
José Valim 8387677a6d Do not merge kv-args and kv-blocks, #100 2012-01-18 12:43:41 +01:00
José Valim 82ddbaeae4 Chapter 4 is done. 2012-01-18 00:04:22 +01:00
José Valim c6176548d2 Rename Orddict.fetch -> Orddict.get. 2012-01-16 22:18:59 +01:00
José Valim 23c2b5f707 Clean up. 2012-01-16 20:32:02 +01:00
José Valim eca3bcc5b0 Discourage module nesting, closes #101 2012-01-15 21:06:12 +01:00
José Valim 4ca8ce74ef Rename unquote_splice -> unquote_splicing, closes #96 2012-01-15 14:52:53 +01:00
José Valim 1fbd24078e Add docs to for. 2012-01-15 14:49:54 +01:00
José Valim c5405da00d Rename for and bitfor to lc and bc. 2012-01-15 14:35:00 +01:00
José Valim 5845cf1dce Update quote docs to mention hygiene 2012-01-11 15:20:12 +01:00
José Valim fc961cf40d Simplify try/catch to be more like Erlang's and not require a tuple. 2012-01-11 07:33:44 +01:00
José Valim 94eda15711 Rename args for vars from false to nil. 2012-01-11 06:56:11 +01:00
José Valim 11d1486d8a Use __var for quoted variables. 2012-01-09 20:08:02 +01:00
José Valim 2c979f6079 Allow isolated function declaration. 2012-01-09 13:05:35 +01:00
José Valim 647b1feca2 Add List::Inspect and to_list. 2012-01-09 09:47:20 +01:00
José Valim d93926841d Rename stringify to to_binary. 2012-01-09 09:24:25 +01:00
José Valim 5992acda6c Add refer that extracts one of the responsibilities from require. 2012-01-07 10:01:55 +01:00
José Valim 5a95eca33c Remove wrong usage of List 2012-01-06 13:19:22 +01:00
José Valim 19950b898b Finish porting CLI tests. 2012-01-05 20:50:19 +01:00
José Valim c7073491ff Start porting Code and CLI tests. 2012-01-05 20:23:53 +01:00
José Valim 43d5dc7ca6 Add List#join. 2012-01-05 19:16:38 +01:00
José Valim 4cf5dbf6a5 Protocol expects an argument. 2012-01-05 18:32:08 +01:00
José Valim 72ab05aecc Refactor protocol to also implement __protocol_for__ 2012-01-05 17:51:55 +01:00
José Valim dac3199eb1 Bump up Code file. 2012-01-05 10:38:11 +01:00
José Valim 18522ab909 Let the compiler do the hard work for you. 2012-01-03 17:17:36 +01:00
José Valim d815f7f6bb Finish documenting main macros. 2012-01-02 17:21:11 +01:00
José Valim 275bb803c7 Docs for quote, unquote and unquote_splice. 2012-01-02 17:01:01 +01:00
José Valim b8320282c1 Docs for __MODULE__, __LINE__, __FILE__, use, require and import. 2012-01-02 16:48:08 +01:00
José Valim 961b3f6556 Add docs for case/receive/try. 2012-01-02 16:27:35 +01:00
José Valim b6d07102aa Small doc fixes. 2012-01-02 14:58:05 +01:00
José Valim 2ad0e6bbda No need to fetch from orddict. 2012-01-02 14:56:35 +01:00
José Valim ebc32eca3c More docs. 2012-01-02 14:53:42 +01:00
José Valim 57fe0048fa Docs for defmodule and def. 2012-01-02 14:21:36 +01:00
José Valim 97529ac1c6 Allow to define functions without a body as a documentation format. 2012-01-02 14:07:07 +01:00
José Valim 25b6b760b6 Define elem and setelem as macros according to Elixir style, closes #61 2012-01-02 13:59:14 +01:00
José Valim 3f2cf5ce0d Minor improvements. 2012-01-02 13:20:58 +01:00
José Valim 2080e054ab module -> defmodule 2012-01-02 11:08:25 +01:00
José Valim 99dd7e3043 Use the new Inspect protocol instead of manual conversion. 2012-01-02 10:32:44 +01:00
Andrzej Sliwa 0b88c1bcbe handling linu numbers in stacktraces on R15 2012-01-02 09:43:00 +01:00
José Valim 0523c2719b Finish anonymous loops. 2012-01-01 17:22:24 +01:00
José Valim bffe36c1b3 Refactor kv block handling to support multiple args. 2012-01-01 15:33:20 +01:00
José Valim a2ee9597bc Improve protocol handling. 2011-12-31 16:42:08 +01:00
José Valim 2a53650197 Remove call operators as they are ambiguous. 2011-12-31 13:11:34 +01:00
José Valim 4edf90c138 Initial work on defimpl. 2011-12-31 09:45:45 +01:00
José Valim 388e14ec8e Start work on defprotocol. 2011-12-31 09:15:56 +01:00
José Valim b1e9607c8e Nested calls to require overrides previous definitions. 2011-12-30 13:39:15 +01:00
José Valim 537dcf0a45 Raise error on macro+local conflict. 2011-12-30 13:20:59 +01:00
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 9e8c84a6eb Refer works. 2011-12-29 20:11:43 +01:00
José Valim ece7a55ee4 Nest ALL the modules. 2011-12-29 19:16:05 +01:00
José Valim 9e574639eb More work on references. 2011-12-29 19:08:25 +01:00