some suggestions

HI guys. I was wondering how I could send some suggestions about the .net languages.

Since the new version is gonig to be released very soon, I was wondering if I could pass these comments to the dot net dev team.

Does anybody know any email addresses? any web forms?


There are two issues anyways, which are listed below. Please do not hesitate to contact me.

Thanks.
/Ali

Please contact ali at jannatpour d0t c0m; (please do not spam)

============================================================================

ISSUE 1: 'callable' a new generalized delegate


I think having this feature added to the .net languages makes a lot of code enhancements.
It is about the delegates. As you know, major difference between a delegate and a function pointer is that in the delegates it does not matter if we call a static member or a a regular one (even regardless of the access control).
What I am suggestingis to move one step forward and make it more generalized.
If we can somehow pass the calling information of any general method to a structure it would help a lot.
For example, for threading, we need to call a ThreadStart delagate. But usually our threads have more arguments.
let's say:

void MyThreadFunction(object @params)
{
}

if we want that function to be run in a separate thread, the easiest way would be to create a wrapper class in order save all the parameters in a object instance and then pass the whole information using a proxy.
For example:

class MyThreadHandler
{
public delagate void Callable(object @params);
private object @params;
private Callable callable;

private MyThreadHandler()
{
}

public static RunMeInASeparateThread(Callable callable, object @params)
{
MyThreadHandler h = new MyThreadHandler();
h.callable = callable;
h.@params = @params;
new Thread(new ThreadStart(this.Run)).Run();
}

private Run()
{
this.callable(@params);
}
}

where somewhere in main:

...
MyThreadHandler.RunMeInASeparateThread(new MyThreadHandler.Callable(MyThreadFunction), null);

what I am suggesting is:

why don't we add something like this:

(new Thread(new callable(MyThreadFunction, @params) as ThreadStart)).Run();

Isn't that wonderful?

Or even more using the new 'callable' feature, we can pass more arguments even from the callers.

it will be easy to implement internally becuase basically it stores all the MemberInfo data plus the arguments in a data structure.
But the point is that it is transparent to the progammer and will be very usefule in AOP as well.


============================================================================

ISSUE 2: skins and ASP.NET

The new skining feature in ASP 2 is wonderful however it only covers on single tag.
What I am suggesting is to provide a feature (something like XSLT) in order to transform (or render) a template into the html skin.
In most applications, we have to provide so many tags (nested and complicated) for each panel.
It will be good if we separate the UI body from the rest (server side vadiables, inputs, ...)

I have some codes which I can send it anytime for you to preview. What I am saying is that while we have XSLT standardized, why don't we use it?

[3639 byte] By [AliJannatpour] at [2007-12-16]
# 1
Hi,

you can make your suggestions at Product Feedback Center:

http://lab.msdn.microsoft.com/productfeedback/default.aspx

rgerbig at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified