473,394 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

C# plans towards metaprogramming

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#?
Jun 27 '08 #1
7 1381
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
Jun 27 '08 #2
On May 8, 9:17*am, Valery <vale...@gmail.comwrote:
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#?
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#
Jun 27 '08 #3
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" <va*****@gmail.comwrote in message
news:94**********************************@p39g2000 prm.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#?
Jun 27 '08 #4
On May 8, 11:30*pm, Marc Gravell <marc.grav...@gmail.comwrote:
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
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
Jun 27 '08 #5
On May 9, 10:18*am, "Peter Bromberg [C# MVP]"
<pbromb...@nospammaam.yahoo.comwrote:
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.comwrote in message

news:94**********************************@p39g2000 prm.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 quotedtext -

- Show quoted text -
Hm. Couldn't find anything there ...
Jun 27 '08 #6
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/...operators.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
Jun 27 '08 #7
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)

Jun 27 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Dave | last post by:
Would people agree with the statement that to a large degree, using template metaprogramming techniques turns a C++ compiler into a C++ interpreter (but just for the metaprogrammed portions of the...
9
by: Rock Johnson | last post by:
I understand that template metaprogramming is a technique that allows for calcualations to occur at compile-time rather than run-time. Can someone explain what is the benefit of this, and when it...
3
by: wakun | last post by:
Hi there, I am working a project in numerical computation in which iterative method is applied for solving equation. The problem is so big and slow. Few days ago, I found a paper on...
9
by: PengYu.UT | last post by:
Hi, I have the code below this email. I want to replace the last 4 lines with a Metaprogramming loop to get something like the following (I don't know the syntax). Is it possible? for type in...
7
by: Joe | last post by:
Hi, I found a concept named template metaprogramming that can be used in C+ + code at compile-time. I am a beginner at C++. But I am a programmer on the .NET platform. Do you know if template...
5
by: iapx86 | last post by:
My parser project calls for a computed goto (see code below). The C preprocessor delivers the desired result, but is ugly. Template metaprogramming delivers results I do not understand. Can...
9
by: andrew cooke | last post by:
Hi, Thanks for the help a couple of days ago. I completed what I was doing and wrote a summary which I've posted at http://acooke.org/cute/PythonMeta0.html (it's kind of long to post here). I...
16
by: Wilson | last post by:
Hi all, I have an interesting problem that I'm hoping can be solved with metaprogramming, but I don't know how far Python supports code generation (and I don't know if I'm taking the correct...
12
by: nooneinparticular314159 | last post by:
Hello. If I declare the following: template<int a, int b, int SomeArray> class DoSomething{ public: .. .. ..
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.