当前在线人数16805
首页 - 分类讨论区 - 电脑网络 - 窗口里的风景版 -阅读文章
未名交友
[更多]
[更多]
文章阅读:[合集] 你们最不喜欢.net的什么?
[同主题阅读] [版面: 窗口里的风景] [作者:les] , 2007年03月19日20:50:24
les
进入未名形象秀
我的博客
[上篇] [下篇] [同主题上篇] [同主题下篇]

发信人: les (Walk the walk, talk the talk), 信区: DotNet
标  题: [合集] 你们最不喜欢.net的什么?
发信站: BBS 未名空间站 (Mon Mar 19 20:50:24 2007), 站内

☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Thu Mar  8 14:53:20 2007) 提到:

具体到某语言也行


☆─────────────────────────────────────☆
  rodney (gotoAndPlay(0)) 于 (Thu Mar  8 15:05:03 2007) 提到:

最不喜欢:

1:不跨平台,基本上无法运行在非windows的环境里。
2:对多媒体缺乏足够支持。

【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: 具体到某语言也行




☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Thu Mar  8 15:12:03 2007) 提到:

支持第二点。特别是没有3D library.
第一点不太care.不过前一阵子不是有新闻说Microsoft teams with novell to
support mono project吗。
【 在 rodney (gotoAndPlay(0)) 的大作中提到: 】
: 最不喜欢:
: 1:不跨平台,基本上无法运行在非windows的环境里。
: 2:对多媒体缺乏足够支持。





☆─────────────────────────────────────☆
  rodney (gotoAndPlay(0)) 于 (Thu Mar  8 15:24:23 2007) 提到:

mono早就不是新闻了,也一直没什么可以拿出手的。
相当不看好。

【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: 支持第二点。特别是没有3D library.
: 第一点不太care.不过前一阵子不是有新闻说Microsoft teams with novell to
: support mono project吗。




☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Thu Mar  8 15:39:01 2007) 提到:

open source的问题还是缺乏统一的business strategy

【 在 rodney (gotoAndPlay(0)) 的大作中提到: 】
: mono早就不是新闻了,也一直没什么可以拿出手的。
: 相当不看好。




☆─────────────────────────────────────☆
  cogt (苦荆茶) 于 (Thu Mar  8 16:54:28 2007) 提到:

出来的太晚。。。xixi
【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: 具体到某语言也行





☆─────────────────────────────────────☆
  a9 (嗯) 于 (Thu Mar  8 16:56:01 2007) 提到:

不是有direct吗?

【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: 标  题: Re: 你们最不喜欢.net的什么?
: 发信站: BBS 未名空间站 (Thu Mar  8 15:12:03 2007)
:
: 支持第二点。特别是没有3D library.
: 第一点不太care.不过前一阵子不是有新闻说Microsoft teams with novell to
: support mono project吗。
: 【 在 rodney (gotoAndPlay(0)) 的大作中提到: 】
: : 最不喜欢:
: : 1:不跨平台,基本上无法运行在非windows的环境里。
: : 2:对多媒体缺乏足够支持。
:
:
:
: --
:
: ※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 192.168.]





☆─────────────────────────────────────☆
  a9 (嗯) 于 (Thu Mar  8 16:56:43 2007) 提到:

其实我觉得跨平台就是搞笑。搞的跟java似的一次编译,到处出错就好了?

【 在 rodney (gotoAndPlay(0)) 的大作中提到: 】
: 标  题: Re: 你们最不喜欢.net的什么?
: 发信站: BBS 未名空间站 (Thu Mar  8 15:05:03 2007), 转信
:
: 最不喜欢:
:
: 1:不跨平台,基本上无法运行在非windows的环境里。
: 2:对多媒体缺乏足够支持。
:
: 【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: : 具体到某语言也行
:
:
: --
: 只有早上白兰地,晚上白兰地,生活之路才能兰花遍地。
:
:
:
: ※ 来源:·BBS 未名空间站 mitbbs.com·[FROM: 216.133.]





☆─────────────────────────────────────☆
  rodney (gotoAndPlay(0)) 于 (Thu Mar  8 17:21:37 2007) 提到:

也不用说跨平台。能做到同时支持UNIX就足够了。

【 在 a9 (嗯) 的大作中提到: 】
: 其实我觉得跨平台就是搞笑。搞的跟java似的一次编译,到处出错就好了?




☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Thu Mar  8 17:38:53 2007) 提到:

UNIX is TOOOOOOOO big a term....

【 在 rodney (gotoAndPlay(0)) 的大作中提到: 】
: 也不用说跨平台。能做到同时支持UNIX就足够了。




☆─────────────────────────────────────☆
  rodney (gotoAndPlay(0)) 于 (Thu Mar  8 17:46:42 2007) 提到:

那总不能说只支持BSD吧。要支持就得上UNIX这个term。

【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: UNIX is TOOOOOOOO big a term....




☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Thu Mar  8 17:49:12 2007) 提到:

to support "UNIX" is a lot harder than supporting windows.

【 在 rodney (gotoAndPlay(0)) 的大作中提到: 】
: 那总不能说只支持BSD吧。要支持就得上UNIX这个term。




☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Thu Mar  8 19:17:59 2007) 提到:

批评这种迟到早退的现象.:)
【 在 cogt (苦荆茶) 的大作中提到: 】
: 出来的太晚。。。xixi





☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Thu Mar  8 19:18:47 2007) 提到:

不是pure managed code solution啊
【 在 a9 (嗯) 的大作中提到: 】
: 不是有direct吗?





☆─────────────────────────────────────☆
  a9 (嗯) 于 (Thu Mar  8 20:01:14 2007) 提到:

我觉得能把x86CPU的主流操作系统支持一下就行

【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: 标  题: Re: 你们最不喜欢.net的什么?
: 发信站: BBS 未名空间站 (Thu Mar  8 17:49:12 2007), 转信
:
: to support "UNIX" is a lot harder than supporting windows.
:
: 【 在 rodney (gotoAndPlay(0)) 的大作中提到: 】
: : 那总不能说只支持BSD吧。要支持就得上UNIX这个term。
:
:
: --
:
:
: 夢後樓台高鎖,酒醒簾幕低垂。去年春恨卻來時,落花人獨立,微雨燕雙飛。  
: 記後小蘋初見,兩重心字羅衣。琵琶絃上說相思。當時明月在,曾照彩雲歸。
:
:
:
: ※ 来源:·BBS 未名空间站 mitbbs.com·[FROM: 24.16.]





☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Thu Mar  8 20:02:39 2007) 提到:

跟CPU关系不大
【 在 a9 (嗯) 的大作中提到: 】
: 我觉得能把x86CPU的主流操作系统支持一下就行




☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Fri Mar  9 09:30:52 2007) 提到:

对比一下java,是不是也要针对每一个Unix/Linux编写一个jvm呢?
.net的问题是M$和厂商没有motivation to do that.
【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: 跟CPU关系不大





☆─────────────────────────────────────☆
  LifeAsWater (烟水寒) 于 (Fri Mar  9 10:31:21 2007) 提到:

不支持UNIX, .Net 只能小打小闹.

个人感觉Delegate完全是错误.

VS Studio 对Web service 的具体实现不好. 不如COM的实现概念.

【 在 a9 (嗯) 的大作中提到: 】
: 我觉得能把x86CPU的主流操作系统支持一下就行





☆─────────────────────────────────────☆
  a9 (嗯) 于 (Fri Mar  9 10:42:44 2007) 提到:

讲讲你这三点,呵呵。

【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: 标  题: Re: 你们最不喜欢.net的什么?
: 发信站: BBS 未名空间站 (Fri Mar  9 10:31:21 2007)
:
: 不支持UNIX, .Net 只能小打小闹.
:
: 个人感觉Delegate完全是错误.
:
: VS Studio 对Web service 的具体实现不好. 不如COM的实现概念.
:
: 【 在 a9 (嗯) 的大作中提到: 】
: : 我觉得能把x86CPU的主流操作系统支持一下就行
:
:
:
: --
:
: ※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 65.223.]





☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Fri Mar  9 11:04:28 2007) 提到:

恩,不大明白“VS Studio 对Web service 的具体实现不好“

【 在 a9 (嗯) 的大作中提到: 】
: 讲讲你这三点,呵呵。





☆─────────────────────────────────────☆
  NeverLearn (Nice people finish last) 于 (Fri Mar  9 11:28:18 2007) 提到:

Need a ORM fast. They should be able to produce one a few years ago
but probably for some marketing issues they chose not.

【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: 具体到某语言也行





☆─────────────────────────────────────☆
  LifeAsWater (烟水寒) 于 (Fri Mar  9 11:52:43 2007) 提到:

1. 不支持UNIX, .Net 只能小打小闹.
这个问题的讨论太多了. 


2. 个人感觉Delegate完全是错误.
reflection的abuse应用. 还不如继续抄Java.


3.VS Studio 对Web service 的具体实现不好. 不如COM的实现概念.
Against the first OO principal, programming to interface not implementation.
特别对于web service. COM做的都比这个好. 还不如继续抄COM.

【 在 a9 (嗯) 的大作中提到: 】
: 讲讲你这三点,呵呵。





☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Fri Mar  9 12:28:36 2007) 提到:

delegate跟reflection有什么关系?
【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: 1. 不支持UNIX, .Net 只能小打小闹.
: 这个问题的讨论太多了. 
: 2. 个人感觉Delegate完全是错误.
: reflection的abuse应用. 还不如继续抄Java.
: 3.VS Studio 对Web service 的具体实现不好. 不如COM的实现概念.
: Against the first OO principal, programming to interface not
implementation.
: 特别对于web service. COM做的都比这个好. 还不如继续抄COM.




☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Fri Mar  9 12:53:12 2007) 提到:


【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: 1. 不支持UNIX, .Net 只能小打小闹.
: 这个问题的讨论太多了. 
: 2. 个人感觉Delegate完全是错误.
: reflection的abuse应用. 还不如继续抄Java.
: 3.VS Studio 对Web service 的具体实现不好. 不如COM的实现概念.
: Against the first OO principal, programming to interface not
implementation.
I don't buy this, though I am a fans of interface but, it doesn't neccessary
to be a principal.
: 特别对于web service. COM做的都比这个好. 还不如继续抄COM.





☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Fri Mar  9 12:57:40 2007) 提到:

我还是没明白,VS对WS的实现是什么意思?
【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: implementation.
: I don't buy this, though I am a fans of interface but, it doesn't
neccessary
:  to be a principal.




☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Fri Mar  9 13:01:42 2007) 提到:

估计说的是在vs里reference webserive自动生成的classes吧。
我一开始就问了这个问题,没人回答,就瞎猜了。
【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: 我还是没明白,VS对WS的实现是什么意思?
: neccessary





☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Fri Mar  9 13:04:23 2007) 提到:

这跟.NET没啥关系,最多是说VS不好罢了。
【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: 估计说的是在vs里reference webserive自动生成的classes吧。
: 我一开始就问了这个问题,没人回答,就瞎猜了。




☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Fri Mar  9 13:05:27 2007) 提到:

hmm, well, 好像那些是跟WCF一起发布的,呵呵
【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: 这跟.NET没啥关系,最多是说VS不好罢了。




☆─────────────────────────────────────☆
  LifeAsWater (烟水寒) 于 (Fri Mar  9 13:06:40 2007) 提到:

delegate class的internal实现based on reflection.

画蛇添足.

method name v.s interface
same performance; interface is much more clear.

【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: delegate跟reflection有什么关系?
: implementation.





☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Fri Mar  9 13:09:24 2007) 提到:

那只是一个implementation而已,不能说是delegate的错。我承认reflection是double
bladed sword, abuse了是很危险的。这就是设计的时候的一个trade off了
【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: delegate class的internal实现based on reflection.
: 画蛇添足.
: method name v.s interface
: same performance; interface is much more clear.




☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Fri Mar  9 13:11:17 2007) 提到:


【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: delegate class的internal实现based on reflection.
: 画蛇添足.
: method name v.s interface
You mean astract class vs interface?
I doubt that same performance conclusion here if you are comparing astract
class with interface
: same performance; interface is much more clear.





☆─────────────────────────────────────☆
  LifeAsWater (烟水寒) 于 (Fri Mar  9 13:15:02 2007) 提到:

web service 的基本要求 language, platform independent.

COM的实现: idl first.

WCF也不支持WSDL first.

Programming to interface, the interface for web service is the wsdl. 


【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: 估计说的是在vs里reference webserive自动生成的classes吧。
: 我一开始就问了这个问题,没人回答,就瞎猜了。





☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Fri Mar  9 13:15:48 2007) 提到:

个人认为delegate非常好。
设计中的确有很多trade off,是提供更底层的api还是high level的wrapper?
event有没有存在的必要了?
【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: 那只是一个implementation而已,不能说是delegate的错。我承认reflection是
double
:  bladed sword, abuse了是很危险的。这就是设计的时候的一个trade off了





☆─────────────────────────────────────☆
  a9 (嗯) 于 (Fri Mar  9 13:40:43 2007) 提到:

我英语也不太好,你们说了那么些名词我也不知道是啥意思。
我个人挺喜欢delegate,不知道你们说的到底哪儿不好。呵呵

【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: 标  题: Re: 你们最不喜欢.net的什么?
: 发信站: BBS 未名空间站 (Fri Mar  9 13:15:48 2007)
:
: 个人认为delegate非常好。
: 设计中的确有很多trade off,是提供更底层的api还是high level的wrapper?
: event有没有存在的必要了?
: 【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: : 那只是一个implementation而已,不能说是delegate的错。我承认reflection是
: double
: :  bladed sword, abuse了是很危险的。这就是设计的时候的一个trade off了
:
:
:
: --
:
: ※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 192.168.]





☆─────────────────────────────────────☆
  rodney (gotoAndPlay(0)) 于 (Fri Mar  9 13:45:50 2007) 提到:

咣当~~~

【 在 a9 (嗯) 的大作中提到: 】
: 我英语也不太好,你们说了那么些名词我也不知道是啥意思。
: 我个人挺喜欢delegate,不知道你们说的到底哪儿不好。呵呵




☆─────────────────────────────────────☆
  a9 (嗯) 于 (Fri Mar  9 13:51:52 2007) 提到:

你说吧,我用.net也用了5年了,咋就不知道delegate哪儿不好,还望指教啊。

【 在 rodney (gotoAndPlay(0)) 的大作中提到: 】
: 标  题: Re: 你们最不喜欢.net的什么?
: 发信站: BBS 未名空间站 (Fri Mar  9 13:45:50 2007), 转信
:
: 咣当~~~
:
: 【 在 a9 (嗯) 的大作中提到: 】
: : 我英语也不太好,你们说了那么些名词我也不知道是啥意思。
: : 我个人挺喜欢delegate,不知道你们说的到底哪儿不好。呵呵
:
:
: --
: 只有早上白兰地,晚上白兰地,生活之路才能兰花遍地。
:
:
:
: ※ 来源:·BBS 未名空间站 mitbbs.com·[FROM: 216.133.]





☆─────────────────────────────────────☆
  LifeAsWater (烟水寒) 于 (Fri Mar  9 14:08:32 2007) 提到:

two bad things about delegate:

1. it is not type safe. it allows any methods which has the same signature
to be a candidate even that method is not suppose to be.

2. no easy way to group delegate.

delegate is same as method name, when comparing method name vs. interface,
it means delegate vs. interface approach.

【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: 个人认为delegate非常好。
: 设计中的确有很多trade off,是提供更底层的api还是high level的wrapper?
: event有没有存在的必要了?
: double





☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Fri Mar  9 14:14:38 2007) 提到:


【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: two bad things about delegate:
: 1. it is not type safe. it allows any methods which has the same signature
: to be a candidate even that method is not suppose to be.
This has NOTHING to do with type safety. Don't mix up type with semantics.
: 2. no easy way to group delegate.
: delegate is same as method name, when comparing method name vs. interface,
: it means delegate vs. interface approach.
Delegates are not as useful compared to general lamba abstraction (where
delegates rooted) because they are not treated as values as functional
languages do. That doesn't neccessarily mean they are a bad thing.



☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Fri Mar  9 14:20:20 2007) 提到:


【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: two bad things about delegate:
: 1. it is not type safe. it allows any methods which has the same signature
: to be a candidate even that method is not suppose to be.
Agree, but still trade off
: 2. no easy way to group delegate.
: delegate is same as method name, when comparing method name vs. interface,
: it means delegate vs. interface approach.
You have a good point here. But take a look at this:
http://www.devsource.com/talkback_details/0,1932,s=3406&a=130228,00.asp?m=19565





☆─────────────────────────────────────☆
  LifeAsWater (烟水寒) 于 (Fri Mar  9 14:36:24 2007) 提到:

Compare delegate approach v.s. interface approach

1. delegate is not type safe. interface explicitly define the contract.

2. no easy way to group delegate. interface can have multiple method defined
.

3. delegate cannot support inheritance. interface supports inheritance and
multiple inheritance.

a delegate is a general class which invoke a predefine method at runtime
using reflection. any method which has the signature can instantiate a
delegate. it is type safe issue. 

No one is bad if it does not be compared to other.
 

【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: This has NOTHING to do with type safety. Don't mix up type with semantics.
: Delegates are not as useful compared to general lamba abstraction (where
: delegates rooted) because they are not treated as values as functional
: languages do. That doesn't neccessarily mean they are a bad thing.





☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Fri Mar  9 14:46:21 2007) 提到:

you still don't get it. this is not related to "type safety".

【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: Compare delegate approach v.s. interface approach
: 1. delegate is not type safe. interface explicitly define the contract.
: 2. no easy way to group delegate. interface can have multiple method
defined
: .
: 3. delegate cannot support inheritance. interface supports inheritance and
: multiple inheritance.
: a delegate is a general class which invoke a predefine method at runtime
: using reflection. any method which has the signature can instantiate a
: delegate. it is type safe issue. 
: No one is bad if it does not be compared to other.
: ...................



☆─────────────────────────────────────☆
  LifeAsWater (烟水寒) 于 (Fri Mar  9 14:48:50 2007) 提到:

Good to know.

delegate is slower than interface.

I previously assume that both have the same performance.


【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: Agree, but still trade off
: You have a good point here. But take a look at this:
: http://www.devsource.com/talkback_details/0,1932,s=3406&a=130228,00.asp?m=19565





☆─────────────────────────────────────☆
  Dintern (.Net newbie) 于 (Fri Mar  9 15:02:03 2007) 提到:

【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: two bad things about delegate:
: 1. it is not type safe. it allows any methods which has the same
: signature to be a candidate even that method is not suppose to be.

It's not a type issue, because the name of a method is not a part
of a type.

: 2. no easy way to group delegate.

That's one granularity people sometimes prefer. In Java, if all I want
to implement is one event listener method, I still have to implement
the other ones in the interface either by hand or adapters. With
delegates, you work on the one you like and skip the others. There's
no need of interfaces at all here.



☆─────────────────────────────────────☆
  LifeAsWater (烟水寒) 于 (Fri Mar  9 15:14:33 2007) 提到:

In fact, when you define a delegate, you define a class.

public delegate void Success();
public delegate void Fail();

void Test()
{
}

I can intantiate a delegate Success with method Test.
I also can intantiate a delegate Fail with method Test.

From the OO point of view, Test is sucess or fail, contract is not clear at
all.

【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: you still don't get it. this is not related to "type safety".
: defined





☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Fri Mar  9 15:19:00 2007) 提到:

again, you don't get it, this has nothing to do with type safety.

【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: In fact, when you define a delegate, you define a class.
: public delegate void Success();
: public delegate void Fail();
: void Test()
: {
: }
: I can intantiate a delegate Success with method Test.
: I also can intantiate a delegate Fail with method Test.
: From the OO point of view, Test is sucess or fail, contract is not clear
at
: all.
: ...................



☆─────────────────────────────────────☆
  les (Walk the walk, talk the talk) 于 (Fri Mar  9 15:35:10 2007) 提到:

hehe, we have a very good discussion here.
But it's not neccessary to focus too much on the specific word(Opaque,Safe
or Type safe).
I think people know about this tradeoff(Opaque/flexible) from day one.

Let's take a look what MSDN says:

Type Safety, Security, and Verifiability

Delegates are entirely opaque structures. There are no operations on
delegates except for a constructor, and methods to invoke the encapsulated
function. The code of even these methods is supplied by the runtime rather
than by the compiler. The runtime is able to guarantee the encapsulated
method has the correct signature. Since a delegate encapsulates an object
reference, it can rely on the metadata for this object to maintain types-
safety at runtime. That is the key to a delegate being typesafe and
verifiable.

A delegate can be considered a mechanism to indirectly invoke a method. Such
an invocation retains the semantics of the more conventional method
invocation, however, in that the method invocation is polymorphic, and it is
not possible to bypass any security demands on the actual method that gets
invoked. Security is not compromised when indirectly invoking methods
through delegates.
【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: again, you don't get it, this has nothing to do with type safety.
: at





☆─────────────────────────────────────☆
  LifeAsWater (烟水寒) 于 (Fri Mar  9 16:13:04 2007) 提到:

Sure, delegate is a class and it must have type safty.
In concept, delegate is same as a method pointer, but delegate is a class.

What I mean that delegate is not type safe, it is that the delegate is a
general class and it only define the signature. Any method has the same
signature can instantiate the delegate. No contract there and no type there.
You still can say tradeoff.

Coin always has double side.

【 在 les (Walk the walk, talk the talk) 的大作中提到: ?: hehe, we have a
very good discussion here.
: But it's not neccessary to focus too much on the specific word(Opaque,Safe
: or Type safe).
: I think people know about this tradeoff(Opaque/flexible) from day one.
: Let's take a look what MSDN says:
: Type Safety, Security, and Verifiability
: Delegates are entirely opaque structures. There are no operations on
: delegates except for a constructor, and methods to invoke the encapsulated
: function. The code of even these methods is supplied by the runtime rather
: than by the compiler. The runtime is able to guarantee the encapsulated
: ...................





☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Fri Mar  9 16:21:27 2007) 提到:


【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: Sure, delegate is a class and it must have type safty.
: In concept, delegate is same as a method pointer, but delegate is a class.
: What I mean that delegate is not type safe, it is that the delegate is a
: general class and it only define the signature. Any method has the same
: signature can instantiate the delegate. No contract there and no type
there.
ft, this is exactly TYPE safe! as long as a program doesn't break the typing
rules of the type system, it's type safe.

and I still don't get your point, delegate or not, nothing can guarantee the
logic correctness, right? you can define an interface with method "fail",
but still you can't enfore the implementation to implement a fail rather
than a sucess.

:  You still can say tradeoff.
: Coin always has double side.
: 【 在 les (Walk the walk, talk the talk) 的大作中提到: ?: hehe, we have a
: very good discussion here.




☆─────────────────────────────────────☆
  LifeAsWater (烟水寒) 于 (Fri Mar  9 16:26:45 2007) 提到:

Are you coding a lot?

【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中岬? 】
: there.
: ft, this is exactly TYPE safe! as long as a program doesn't break the
typing
:  rules of the type system, it's type safe.
: and I still don't get your point, delegate or not, nothing can guarantee
the
:  logic correctness, right? you can define an interface with method "fail",
: but still you can't enfore the implementation to implement a fail rather
: than a sucess.





☆─────────────────────────────────────☆
  Deling (流浪歌手-爬爬死爬腰酸) 于 (Fri Mar  9 16:27:26 2007) 提到:

yes I code a lot

【 在 LifeAsWater (烟水寒) 的大作中提到: 】
: Are you coding a lot?
: 【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中岬? 】
: typing
: the




☆─────────────────────────────────────☆
  LifeAsWater (烟水寒) 于 (Fri Mar  9 16:38:08 2007) 提到:

My point is that interface explicitly define a contract and type.

When a method in a class implement an interface, you clearly know what is
the contract that the method commit to.

But in delegate case, for a method implementation, you never know what the
method comply to. It can be used in any delegate if the signature is match.


【 在 Deling (流浪歌手-爬爬死爬腰酸) 的大作中提到: 】
: yes I code a lot





☆─────────────────────────────────────☆
  yiyayiyayo (Mera naam Itiaan hai) 于 (Tue Mar 13 02:09:28 2007) 提到:


【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: 支持第二点。特别是没有3D library.
: 第一点不太care.不过前一阵子不是有新闻说Microsoft teams with novell to
: support mono project吗。

你做图形吗? 为什么要3D?




☆─────────────────────────────────────☆
  SQL (结构化的查询语言) 于 (Sat Mar 17 00:25:22 2007) 提到:


功能还是太弱。


【 在 les (Walk the walk, talk the talk) 的大作中提到: 】
: 具体到某语言也行





[上篇] [下篇] [同主题上篇] [同主题下篇]
[转寄] [转贴] [回信给作者] [修改文章] [删除文章] [同主题阅读] [从此处展开] [返回版面] [快速返回] [收藏] [举报]
 
回复文章
标题:
内 容:

未名交友
将您的链接放在这儿

友情链接


 

Site Map - Contact Us - Terms and Conditions - Privacy Policy

版权所有,未名空间(mitbbs.com),since 1996