Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C# plans towards metaprogramming

19 views
Skip to first unread message

Valery

unread,
May 8, 2008, 9:17:38 AM5/8/08
to
What is known about C# generics closing the gap with C++ templates in
the future? Template specialization is especially badly missed. What
new language features are coming in the next release of C#?

Marc Gravell

unread,
May 8, 2008, 9:30:12 AM5/8/08
to
Which perceived gaps, in particular? What is it you need to do (and
can't)?

I'm not "in the know", but one thing that is regularly discussed is
allowing more dynamic access to members, which would be a step towards
the duck-typing of C++ templates - but I'm not sure if this is a step
forwards or backwards (in this context; obviously in *specific cases*
dynamic member access is good, but I wouldn't want to use it too
often).

Marc

Ignacio Machin ( .NET/ C# MVP )

unread,
May 8, 2008, 9:33:16 AM5/8/08
to

Hi,

I do not know the answer of your question, but take a look at
http://blogs.msdn.com/ericlippert/default.aspx
you will find a good deal of exploration of future features of C#

Peter Bromberg [C# MVP]

unread,
May 8, 2008, 8:18:19 PM5/8/08
to
I saw a recent article on codeproject.com with an managed code
implementation of C++ Templates for .NET. That might satisfy your curiosity
while you are waiting for the "next version" of C#.
Peter
"Valery" <val...@gmail.com> wrote in message
news:94b068b0-41b4-46ea...@p39g2000prm.googlegroups.com...

Valery

unread,
May 9, 2008, 8:09:16 AM5/9/08
to

Some of the areas of interest: dimensional types (doubles in units of
a particular measure); types with arithmetical features for high-
performance calculations (I need evaluation of sophisticated generic
types with minimal overheads - specialised templates provide for this
well); policy-based programming - to mention a few.

Thanks

Valery

unread,
May 9, 2008, 8:23:55 AM5/9/08
to
On May 9, 10:18 am, "Peter Bromberg [C# MVP]"

<pbromb...@nospammaam.yahoo.com> wrote:
> I saw a recent article on codeproject.com with an managed code
> implementation of C++ Templates for .NET. That might satisfy your curiosity
> while you are waiting for the "next version" of C#.
> Peter"Valery" <vale...@gmail.com> wrote in message

>
> news:94b068b0-41b4-46ea...@p39g2000prm.googlegroups.com...
>
>
>
> > What is known about C# generics closing the gap with C++ templates in
> > the future? Template specialization is especially badly missed. What
> > new language features are coming in the next release of C#?- Hide quoted text -
>
> - Show quoted text -

Hm. Couldn't find anything there ...

Marc Gravell

unread,
May 9, 2008, 8:22:45 AM5/9/08
to
Tuple support is an interesting one, especially given that this is how
F# works... but I'm not sure it is especially hard to knock a few tuples
together as generic types (or indeed as an anonymous type if only the
caller need know)...

Re the arithmetic - yes; definitely a weakness. If it helps, I've spent
quite a bit of time looking at generic arithmetic; not *quite* as quick,
but still fast (and no additional coding):
http://www.yoda.arachsys.com/csharp/miscutil/usage/genericoperators.html
(download as part of "miscutil")

To be honest I'm not too familiar with policy-based, so I won't presume
to comment.

Marc

Anders Borum

unread,
May 10, 2008, 1:55:07 AM5/10/08
to
I'm just after variance in return types - that's it. I'd recommend looking
at Jon Skeets blog also for additional requests to C#.

--
With regards
Anders Borum / SphereWorks
Microsoft Certified Professional (.NET MCP)

0 new messages