l*a
14 楼
accessor methods (get/set): 2 interfaces
property: one interface for two behaviors (get and set).
A type of polymorphism?
property: one interface for two behaviors (get and set).
A type of polymorphism?
c*e
17 楼
http://www.javalobby.org/java/forums/t90862.html
i didn't read all of it but it seems relevant
【在 g******e 的大作中提到】
: 确实是这样,感觉C#冗余的keywords是比较多。可能是我比较习惯Java的缘故
i didn't read all of it but it seems relevant
【在 g******e 的大作中提到】
: 确实是这样,感觉C#冗余的keywords是比较多。可能是我比较习惯Java的缘故
c*e
19 楼
i think the idea is to make things very explicit to
cut down on errors and confusion. also, i think keywords
like readonly and sealed are more descriptive of
their nature and thus are more readable.
of
【在 g******e 的大作中提到】
: readonly
: new (as a modifier)
: sealed
: I know they all have their usage and meanings. It looks like the designer of
: C# likes to give only one meaning for a keyword other than make fewer
: keywords but give them different meanings in different situations.
cut down on errors and confusion. also, i think keywords
like readonly and sealed are more descriptive of
their nature and thus are more readable.
of
【在 g******e 的大作中提到】
: readonly
: new (as a modifier)
: sealed
: I know they all have their usage and meanings. It looks like the designer of
: C# likes to give only one meaning for a keyword other than make fewer
: keywords but give them different meanings in different situations.
b*n
21 楼
不同意
同意
不同意
of
其实最无聊的是property还有几个其他的。
【在 g******e 的大作中提到】
: readonly
: new (as a modifier)
: sealed
: I know they all have their usage and meanings. It looks like the designer of
: C# likes to give only one meaning for a keyword other than make fewer
: keywords but give them different meanings in different situations.
g*e
22 楼
Hehe, I don't in Java world there is a cry for property. :-))
I actually don't agree even with the first statement of the article.
"Developers arguing against properties typically fall into two categories.
There are those who oppose language changes in general and those who don't
want it simply because C# has them."
I think most people against it are not in either of these two categories.
Most people just want to keep the language simple and neat (less is more. :-
))
【在 c**e 的大作中提到】
: http://www.javalobby.org/java/forums/t90862.html
: i didn't read all of it but it seems relevant
I actually don't agree even with the first statement of the article.
"Developers arguing against properties typically fall into two categories.
There are those who oppose language changes in general and those who don't
want it simply because C# has them."
I think most people against it are not in either of these two categories.
Most people just want to keep the language simple and neat (less is more. :-
))
【在 c**e 的大作中提到】
: http://www.javalobby.org/java/forums/t90862.html
: i didn't read all of it but it seems relevant
g*e
23 楼
I agree. This is one approach of language design.
But sometime if one keyword has its natural meanings in different scenarios
maybe it is good to save some words. :-)
Like in Java, final can be used to define a constant, or if it is in front
of a method it means the method can not be overwritten.
Anyway, both approaches are fine. They are just the preference of the
designers and we have to follow.
【在 c**e 的大作中提到】
: i think the idea is to make things very explicit to
: cut down on errors and confusion. also, i think keywords
: like readonly and sealed are more descriptive of
: their nature and thus are more readable.
:
: of
But sometime if one keyword has its natural meanings in different scenarios
maybe it is good to save some words. :-)
Like in Java, final can be used to define a constant, or if it is in front
of a method it means the method can not be overwritten.
Anyway, both approaches are fine. They are just the preference of the
designers and we have to follow.
【在 c**e 的大作中提到】
: i think the idea is to make things very explicit to
: cut down on errors and confusion. also, i think keywords
: like readonly and sealed are more descriptive of
: their nature and thus are more readable.
:
: of
l*s
24 楼
scenarios
This is definitely something .net try to avoid and the part I like: simple,
foolproof,robust and powerful.
Overall, I like c# much better than JAVA.
【在 g******e 的大作中提到】
: I agree. This is one approach of language design.
: But sometime if one keyword has its natural meanings in different scenarios
: maybe it is good to save some words. :-)
: Like in Java, final can be used to define a constant, or if it is in front
: of a method it means the method can not be overwritten.
: Anyway, both approaches are fine. They are just the preference of the
: designers and we have to follow.
L*r
26 楼
internally, property is nothing but setter/getter.
you can argue that property does not bring too much to your class
implementation. but property is a syntax sugar to the client code which use
your class.
C#确实有很多的keywords. a lot of them are syntax sugar. 大部分还是很make
sense.
【在 g******e 的大作中提到】
: 确实是这样,感觉C#冗余的keywords是比较多。可能是我比较习惯Java的缘故
you can argue that property does not bring too much to your class
implementation. but property is a syntax sugar to the client code which use
your class.
C#确实有很多的keywords. a lot of them are syntax sugar. 大部分还是很make
sense.
【在 g******e 的大作中提到】
: 确实是这样,感觉C#冗余的keywords是比较多。可能是我比较习惯Java的缘故
k*i
28 楼
I assumed that you are comparing public variable and property. Think about
the followings:
1. What if you want to make a field readonly to other classes while writable
in the in the class it's defined.
2. What if you want to do something else(logging some information for
example) before writing to the field?
3. Think about the differences in reflection, intellisense and the
generation of the library documentation
【在 s****u 的大作中提到】
: 是啊,用起来很不爽,不知道他为什么有时候提供几种做同一个事情的方法
the followings:
1. What if you want to make a field readonly to other classes while writable
in the in the class it's defined.
2. What if you want to do something else(logging some information for
example) before writing to the field?
3. Think about the differences in reflection, intellisense and the
generation of the library documentation
【在 s****u 的大作中提到】
: 是啊,用起来很不爽,不知道他为什么有时候提供几种做同一个事情的方法
s*u
29 楼
你的assume不成立啊,我只是说它的api比较臃肿
writable
【在 k****i 的大作中提到】
: I assumed that you are comparing public variable and property. Think about
: the followings:
: 1. What if you want to make a field readonly to other classes while writable
: in the in the class it's defined.
: 2. What if you want to do something else(logging some information for
: example) before writing to the field?
: 3. Think about the differences in reflection, intellisense and the
: generation of the library documentation
writable
【在 k****i 的大作中提到】
: I assumed that you are comparing public variable and property. Think about
: the followings:
: 1. What if you want to make a field readonly to other classes while writable
: in the in the class it's defined.
: 2. What if you want to do something else(logging some information for
: example) before writing to the field?
: 3. Think about the differences in reflection, intellisense and the
: generation of the library documentation
c*e
30 楼
to evaluate an api fairly, you have to take into account
what users it targets. remember one of the goals
of .net is to bring users of different programming
languages to this common platform. it has to support
multiple programming styles to avoid imposing a
particular style on its users. with java this is
a non-problem because there's only one language,
so the language designer has much less to worry about
in terms of style.
i'm not sure why you think the api is too fat. someone
might be able to
【在 s****u 的大作中提到】
: 你的assume不成立啊,我只是说它的api比较臃肿
:
: writable
what users it targets. remember one of the goals
of .net is to bring users of different programming
languages to this common platform. it has to support
multiple programming styles to avoid imposing a
particular style on its users. with java this is
a non-problem because there's only one language,
so the language designer has much less to worry about
in terms of style.
i'm not sure why you think the api is too fat. someone
might be able to
【在 s****u 的大作中提到】
: 你的assume不成立啊,我只是说它的api比较臃肿
:
: writable
s*u
31 楼
是这样的吗?我说的那个我只是有点印象,C#我一点都不熟
因为我最近做一些有review打分的东西,做C#的特别郁闷,因为很多函数
都要不停msdn来msdn去(因为一直被review说我哪里哪里这样写效率高,哪里哪里
这样写可以少写两句话扣分),相对来说java的api给我的感觉很好
不过为了钱。。。。 -_-
【在 c**e 的大作中提到】
: to evaluate an api fairly, you have to take into account
: what users it targets. remember one of the goals
: of .net is to bring users of different programming
: languages to this common platform. it has to support
: multiple programming styles to avoid imposing a
: particular style on its users. with java this is
: a non-problem because there's only one language,
: so the language designer has much less to worry about
: in terms of style.
: i'm not sure why you think the api is too fat. someone
因为我最近做一些有review打分的东西,做C#的特别郁闷,因为很多函数
都要不停msdn来msdn去(因为一直被review说我哪里哪里这样写效率高,哪里哪里
这样写可以少写两句话扣分),相对来说java的api给我的感觉很好
不过为了钱。。。。 -_-
【在 c**e 的大作中提到】
: to evaluate an api fairly, you have to take into account
: what users it targets. remember one of the goals
: of .net is to bring users of different programming
: languages to this common platform. it has to support
: multiple programming styles to avoid imposing a
: particular style on its users. with java this is
: a non-problem because there's only one language,
: so the language designer has much less to worry about
: in terms of style.
: i'm not sure why you think the api is too fat. someone
a*t
32 楼
re
c*s
33 楼
I'm familiar with c#/.net and unfamiliar with java and I would say the exact
opposite (c# feels better to me). But I also know enough to tell me that
java can do pretty much exactly what c# can do if I can find the right
libraries to use. MSDN does that very well for me for c#, anybody have a
place (outside your head) for java reference?
【在 s****u 的大作中提到】
: 是这样的吗?我说的那个我只是有点印象,C#我一点都不熟
: 因为我最近做一些有review打分的东西,做C#的特别郁闷,因为很多函数
: 都要不停msdn来msdn去(因为一直被review说我哪里哪里这样写效率高,哪里哪里
: 这样写可以少写两句话扣分),相对来说java的api给我的感觉很好
: 不过为了钱。。。。 -_-
opposite (c# feels better to me). But I also know enough to tell me that
java can do pretty much exactly what c# can do if I can find the right
libraries to use. MSDN does that very well for me for c#, anybody have a
place (outside your head) for java reference?
【在 s****u 的大作中提到】
: 是这样的吗?我说的那个我只是有点印象,C#我一点都不熟
: 因为我最近做一些有review打分的东西,做C#的特别郁闷,因为很多函数
: 都要不停msdn来msdn去(因为一直被review说我哪里哪里这样写效率高,哪里哪里
: 这样写可以少写两句话扣分),相对来说java的api给我的感觉很好
: 不过为了钱。。。。 -_-
i*c
34 楼
sun api
exact
【在 c*********s 的大作中提到】
: I'm familiar with c#/.net and unfamiliar with java and I would say the exact
: opposite (c# feels better to me). But I also know enough to tell me that
: java can do pretty much exactly what c# can do if I can find the right
: libraries to use. MSDN does that very well for me for c#, anybody have a
: place (outside your head) for java reference?
exact
【在 c*********s 的大作中提到】
: I'm familiar with c#/.net and unfamiliar with java and I would say the exact
: opposite (c# feels better to me). But I also know enough to tell me that
: java can do pretty much exactly what c# can do if I can find the right
: libraries to use. MSDN does that very well for me for c#, anybody have a
: place (outside your head) for java reference?
i*c
35 楼
java also has
finally like sealed
may not good example
of
【在 g******e 的大作中提到】
: readonly
: new (as a modifier)
: sealed
: I know they all have their usage and meanings. It looks like the designer of
: C# likes to give only one meaning for a keyword other than make fewer
: keywords but give them different meanings in different situations.
finally like sealed
may not good example
of
【在 g******e 的大作中提到】
: readonly
: new (as a modifier)
: sealed
: I know they all have their usage and meanings. It looks like the designer of
: C# likes to give only one meaning for a keyword other than make fewer
: keywords but give them different meanings in different situations.
C*n
36 楼
I guess we need to define "Computing Language". By the end of the day, "C#,
Java, VB ... etc" are supposed to serve the same purpose as Natural language
like English, Chinese, to computer of course. It enables you to give
specific instruction to a computer. But it needs to be able to easily
understood by human being also.
If you can live "one" keyword, don't create "two", that's good for computer.
But not good for humanbeing. Unfortunately the language is writen by
humanbeing, and has to be unde
Java, VB ... etc" are supposed to serve the same purpose as Natural language
like English, Chinese, to computer of course. It enables you to give
specific instruction to a computer. But it needs to be able to easily
understood by human being also.
If you can live "one" keyword, don't create "two", that's good for computer.
But not good for humanbeing. Unfortunately the language is writen by
humanbeing, and has to be unde
相关阅读
Integration developer有前途那吗Linq to entity framework: what happens if i modified DB schema in SSMS ?how to get the days difference between "3/1/2013" and "6/1/2013"Win 8 Pro上怎么enable .Net Framework 3.5?网上web services的免费书,哪本好点?c#或者java都可以。 (转载)PYPL: C# is the language of the year-2012有用过spring.net 和 Nhibernate的大牛吗?请问怎样给页面设置一个倒计时timer,而且点任何键都不会停?服了老印了可否单独发布asp.net的网站程序,而不使用iis?Re: 又开始认证了SQL 2012 (转载)请教detailsview和radiobutton的问题。(Asp.net C#)星际争霸当年的主要开发者之一谈开发的过程应该选择哪个offer:.net操作数据库的方法,哪个最好?how to programatically fill the form and submit itMicrosoft offers cash for writing Windows (Phone) apps请教一个report viewer loading performance 的问题新人再问 sql/linq: No connection string name d 'db5Entities' could be found in the application config fi请教:第一个page产生的arraylist,如何在第二个page调用?