This discussion will get more heated when C# 4.0 introduces the "dynamic" type.
This discussion will get more heated when C# 4.0 introduces the "dynamic" type.
There are a lot of discussion about C++ templates VS C# generics. There is one on MS site also. Both have advantages/disadvantages. Generally templates can do a bit more than generics. But haven't use them excessively to understand how useful the "more" really is.>>From my knowledge, it lacks such things as a lot of generic programming.
>>C# has generics
Maybe someone can shed more light on this?
Well as far as I understand you don't have in C# a way to do a specific implementation of a template class like you would in C++. I haven't created too many generic/templated classes to tell you the whole thing.
You talk of it as if it's a good thing. Generic programming should be generic, not introducing tons of special cases.
Compilation is by definition a translation from one language into another. Whether those languages are C++ to machine code, C# to CIL or CIL to machine code is of no importance.No because C++ does it at compile time. There is a byte-code interpreter, thus technically it's interpreted and compiled. At least that's what they tell us in CS
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
I think the main difference between an interpreted language and a compiled one is that the compiled language doesn't require the original source code to be run.
We then have various types & levels of compilation - but it still is compiled if source file(s) gets converted into a file (or set of files) that can be used without having any access to the original source code.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
wow guys...all that over semantics of words...
anyways, C# 4 will definitely heat up discussions because it will cross the line between static and dynamic languages. although this has already been done previously with languages like Boo and IronPython for .NET, i think C# with microsoft's backing will make a big difference.
Here are the new features http://code.msdn.microsoft.com/csharpfuture
The dynamic sure looks interesting. And finally you can put default values on parameters. I am still wondering why this wasn't able from the beginning.
You had like 4-5 flags in a function and in order to avoid calling something with 20 arguments and mixing every time the flags, your only solution was to use oveloaded function wrappers to do your job, with a small cost of an extra function call. Finally, they saw their error.
yeah, default params are definitely needed, the strategy you had to implement was just annoying. Though allowing you to specify them out of order is kind of meh to me. I watched the PDC where you get a good illustration of what they are trying to do.