On Tue, May 5, 2009 at 4:07 AM, Stefan Behnel <[email protected]> wrote:
> Dag Sverre Seljebotn wrote:
>> Before the C++ syntax sticks
>
> I actually think it makes sense. In declarations, the parameter can appear
> only behind type names, so parsing them would be trivial - except for
> cases where the type name appears in an expression:
>
>    isinstance(x, MyType<int>)
>    type_ref = MyType<int>  vs.  type_ref = SomeValue < something > 5
>
> Not sure if
>
>    type_ref = MyType[int]
>
> makes this any simpler - it may at least simplify the parser, although
> there might be further ambiguities with buffers, array sizes and indexing.

One other thing that you all might want to consider is D's syntax for
templates (http://www.digitalmars.com/d/2.0/templates-revisited.html).
 As much as I am familiar with C++ template stuff, I think it is much
better thought out than C++.  I know it's completely tangential to
python/C, but might be worth considering.

--Hoyt

++++++++++++++++++++++++++++++++++++++++++++++++
+ Hoyt Koepke
+ University of Washington Department of Statistics
+ http://www.stat.washington.edu/~hoytak/
+ [email protected]
++++++++++++++++++++++++++++++++++++++++++
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to