Am 11.11.2013 09:28, schrieb simendsjo:
On Sunday, 10 November 2013 at 22:33:34 UTC, bearophile wrote:
Jacob Carlborg:

http://wiki.dlang.org/DIP50

I suggest to add some more use cases (possibly with their
implementation).

Bye,
bearophile

I agree examples would help a lot. Trying to define what
information actually exists within these types would also help a
lot.

In the first example, would Ast!(bool) be something like this?
    opBinary!"=="
      left = opBinary!"+"
               left = Literal
                 type = int
                 value = 1
               right = Literal
                 type = int
                 value = 2
      right = Literal
        type = int
        value = 4

Would there be helpers for matching part of the structure?
The same applies to the other types used - what information
should they have?

As for examples, here's a couple of suggestions:
* Expression to prefix notation
* Expression to SQL
* AutoImplement properties (like C#)
* Number intervals, like "int i = int[10..20];" where only 10 to
20 are legal values
* Discriminated union
* Pattern matching


can you add the example to the DIP?

Reply via email to