Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Experts*
Posted

I've been doing some work with C++ the last few weeks and I'm really liking the idea of templated code. For example, you can write a template for a function named "swap" and define what it does, then use that swap function for ANY class you want. At compile time, the compiler substitutes in the class-specific version of the function/code for each class type, optimizing things for you.

 

Also, if you have a larger function than swap and need it for multiple class types, you don't have to rewrite it (only changing the class types).

 

Any word if any new version of C# (whidbey or it's next version) have that support? I know it's probably not high on their list, but seems like an easy thing for a compiler to do (I can say that since I'm in the market of making compilers :))

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
  • *Experts*
Posted

Ooo... sounds interesting :)

Any link to a site that has more info (or info on what the next version of .NET might have in general)? :)

 

(Two smilies for the price of none)

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...