C#代码 [英] C# code

查看:66
本文介绍了C#代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C#很棒,但确实有一些缺点。在这里,我检查其中一个

,我肯定认为这是一个缺点。

来自C ++,似乎没有相应的C#来分隔代码

干净利落地为用户带来好处。为什么这很重要?因为用户需要

来维护此代码,而不是机器。 C ++将我们暴露给头文件,其中

是一种将类实现与

声明完全分开的方式。为什么在C#中忽略了这个?在一个类中混合实现和

声明是如此丑陋。 Yuck!


当然intellisense可以带你走很长的路,但它是一个绷带上的绑带。

虽然有可能将课程分成C#中的命名空间你还需要用它来移植实现。呸!如果仅出于讨论目的,可以在没有实现的情况下构思一个类。你好b / b
并不总是对实现感兴趣,这就是为什么它如此令人讨厌。

如果你想把类函数声明带到一个

开会讨论你的新课程?实际上这确实经常发生在
。你不能在C#中做到这一点,而不是非常了解剪切和

粘贴编辑器。智能感知在那里无法帮助你。一个类在其外面有意义

它所雕刻的画布。在视觉

工作室GUI之外存在一个类。不要忘记,命令行中没有intellisense。

C#builder中更高级别的UML工具可能符合要求,但那是'b $ b不是重点。它应该是语言实现的一部分,因为

开发人员可以维护该代码。如果这些

UML解决方案不包含在包装盒中,那就麻烦了。


我们都已经习惯了这个烂摊子,如果你来自Java,那么你总是这么做,所以没有它就好了。但它没有做对。

是(让那是)更好的方式。我记得那时候实施和宣言的时候是不同的野兽。确定编译器

如果实现是在月球上并且在

mars上声明,可能会更少关注,但是再一次,机器通常不会维护代码吗? br />
所以从来没有关于机器。这是为了让b / b
开发人员轻松生活。 C#在这方面失败了。维持

代码的生活更加困难意味着更低的生产力。是的,如果我需要

来弄清楚班级的活动部分,它确实会降低你的工作效率。


我在发泄后感觉好多了。 />

-

-----------

有TidBits吗?

在此处获取: www.networkip.net/tidbits

解决方案

有趣的是,我最喜欢的C#(和java之类的)功能之一是头文件的死亡。

死亡。


我最近不得不写一个MC ++类,并提醒我们有多烦恼

必须要双重定义方法,有参数列表并返回

类型定义在两个地方,或者我最喜欢的C,如果你忘了

定义一个方法,编译器找不到它......天啊,当我''我正在编写C ++

代码在500行以下我会像在C#中那样写我的课程。


我个人不这样做我想回到这些日子,我冒险说这不是被忽视但是天生就拒绝了。


我想我不会不喜欢标题文件......我不知道别人怎么想。


Alvin Bruney" < vapordan_spam_me_not@hotmail_no_spamhotmail.com>写在

消息新闻:%2 ****************** @ TK2MSFTNGP11.phx.gbl ...

C#很棒,但确实有一些缺点。在这里,我检查了
中的一个,我肯定认为这是一个缺点。
来自C ++,似乎没有C#中的等价物来干净地分离代码以保证用户的利益。为什么这很重要?因为用户需要维护此代码,而不是机器。 C ++将我们暴露给头文件,其中包括将类实现
与声明完全分开。为什么在C#中忽略了这个?在一个类中混合实现和
声明是​​如此丑陋。哎呀!

当然intellisense可以带你走很长的路,但它是一个绷带上的绑带。
虽然可以在C#中将类分成名称空间你
仍然需要用它移植实现。呸!如果仅出于讨论目的,可以在没有实现的情况下构思课程。你并不总是对实施感兴趣,这就是为什么它是如此美元b $ b。如果您想将类函数声明带到
会议上讨论您的新课程,该怎么办?这确实经常发生。你不能在C#中做到这一点,而不必非常了解剪切和
粘贴编辑器。智能感知在那里无法帮助你。一个类在它所雕刻的画布之外有
的含义。一个类确实存在于可视化工作室GUI之外。不要忘记,在命令行中没有intellisense。
C#builder中可能更高级别的UML工具符合要求,但是
不是重点。它应该是语言实现的一部分,因为开发人员可以维护该代码。如果这些UML解决方案没有包含在框中,那就更麻烦了。

我们都已经习惯了这个烂摊子,如果你来自Java,你就是' '
总是拥有它所以没有它似乎很奇怪。但它没有做对。
有(这是)更好的方式。我记得那时候实施和宣言是不同的野兽。当然,如果实现是在月球上并且在火星上声明,编译器可能会更少关心,但是再一次,机器通常不会维护代码
对吗?所以从来没有关于机器。这是为了让开发人员轻松生活。 C#在这方面失败了。维持代码的生活更加艰难,意味着生产力降低。是的,如果我需要b $ b需要弄清楚班级的活动部分,它确实会降低我的工作效率。

在发泄后我感觉好多了。

-

-----------
有TidBits吗?
在此处获取: www.networkip.net/tidbits



没有C ++程序员,我想知道他们是否会在他们的长期用户中推广一种斯德哥尔摩综合症 - 你必须和他们一起工作所以

很多,所以你开始感受他们并同情他们

直到你最终离不开它们。


我很难想象标题更适合分离

来自实现的定义,而不是抽象类或接口。

在现实世界中完全可用,并且都会影响结构的总分离




Richard


-

Veuillez m''excuser,mon Fran?aisesttrèspauvre。 Cependant,si vous voyez

mauvais C#,c''estmondéfaut!

" Daniel O''Connell" < onyxkirx @ - NOSPAM--comcast.net>在消息中写道

news:lq0ob.59629


Fm2.42234@attbi_s04 ...

有趣,我最喜欢的功能之一C#(和java,我猜)是
头文件的死亡。

我最近不得不写一个MC ++类并提醒你有多烦人
它是必须双重定义方法,有两个地方定义的参数列表和
返回类型,或者我最喜欢的C,如果你忘了定义一个方法,编译器找不到它......天啊,当我在500行以下编写
C ++代码时,我会经常像在C#中那样写我的课程。

我个人不想回去到目前为止,我冒险说
它并没有被忽视,而是天生就拒绝了。

我想我不喜欢头文件...我想知道其他人想想。

Alvin Bruney < vapordan_spam_me_not@hotmail_no_spamhotmail.com>在
消息新闻中写道:%2 ****************** @ TK2MSFTNGP11.phx.gbl ...

C#很棒但是它确实有一些缺点。在这里,我检查一下


他们

我肯定认为这是一个缺点。
来自C ++,似乎没有C#中的等价物来分隔代码
干净利落地为用户带来好处。为什么这很重要?因为用户
可以维护此代码,而不是机器。 C ++将我们暴露给头文件
,这是一种方法,其中包括将类实现


声明完全分开。为什么在C#中忽略了这个?在一个类中混合实现和
声明是​​如此丑陋。哎呀!

肯定的智能感知可以带你走很长的路,但它是一个b
挫伤的绑带。虽然可以在C#中将类分隔成名称空间,但您仍然需要使用它来移植实现。呸!如果仅出于讨论目的,可以在没有实现的情况下构思课程。
你并不总是对实现感兴趣,这就是为什么它如此


令人讨厌。

如果你想把类函数声明带到你身上怎么办?
会议谈论你的新课程?这确实经常发生。你不能在C#中做到这一点,而不必非常了解切割的
和粘贴编辑器。智能感知在那里无法帮助你。一个类在它被雕刻的画布的

之外有含义


。一个类确实存在于可视化工作室GUI之外。不要忘记,命令行中没有intellisense。
C#builder中可能更高级别的UML工具符合要求,但是


这是

不是重点。它应该是语言实现的一部分,因为开发人员可以维护该代码。如果
这些UML解决方案不包含在框中,那就更麻烦了。

我们都已经习惯了这个烂摊子,如果你来自Java,你就是' 've


总是

拥有它所以没有它似乎很奇怪。但它没有做对。


是(make that)更好的方法。我记得那时候实施和宣言是不同的野兽。当然,如果实现是在月球上并且在火星上声明,编译器可能会更少关心,但是再一次,机器通常不会维护代码


对吗? blockquote class =post_quotes>所以从来没有关于机器。这是为了让开发人员轻松生活。 C#在这方面失败了。更艰难的生活


维护

代码意味着更低的生产力。是的,如果我


需要

来弄清楚一个班级的活动部分,它确实会降低我的工作效率。

我现在感觉好多了发泄。

-

-----------
得到了TidBits?
在这里获取: www.networkip.net/tidbits




C# is great but it does have some short comings. Here, I examine one of them
which I definitely think is a shortcoming.
Coming from C++, there seems to be no equivalent in C# to separate code
cleanly for the user''s benefit. Why is this important? Because a user gets
to maintain this code, not a machine. C++ exposed us to header files which
was a way, among other things, to cleanly separate class implementation from
declaration. Why was this overlooked in C#? Mixing implementation and
declaration inside a class is so ugly. Yuck!

Sure intellisense can take you a long way, but it''s a bandaid on a bruise.
Though it is possible to separate classes out into namespaces in C# you
still have to port the implementation with it. Yuck! A class can be
conceived without an implementation, if only for discussion purposes. You
are not always interested in the implementation, that is why it is so yucky.
What if you want to take the class function declarations with you to a
meeting to talk about your new class? This does actually happen quite
frequently. You can''t do that in C# without intimately knowing the cut and
paste editor. Intellisense can''t help you there. A class has meaning outside
of the canvas it was carved on. A class does exist outside of the visual
studio GUI. Do not forget, there is no intellisense at the command line.
Probably higher level UML tools in C# builder will fit the bill, but that''s
not the point. It should be part of the language implementation because
developers get to maintain that code. It''s even more troublesome if these
UML solutions are not included in the box.

We''ve all gotten used to this mess, and if you come from Java, you''ve always
had it so it seems odd to be without it. But it doesn''t make it right. There
is (make that was) a better way. I remember that time when when
implementation and declaration were different beasts. Sure the compiler
could care less if the implementation was on the moon and declaration on
mars, but then again, a machine does not usually get to maintain code right?
So it was never about the machine. It''s about making life easy for
developers. C# has failed in this regard. A more difficult life maintaining
code means less productivity. Yes, it does make me less productive if I need
to figure out the moving parts of a class.

I feel better now after venting.

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits

解决方案

Interesting, one of my favorite features of C#(and java, I suppose) was the
death of the header file.

I recently had to go write a MC++ class and got a reminder on how annoying
it was to have to double define methods, to have parameter lists and return
types defined in TWO places, or my favorite in C, where if you forgot to
define a method the compiler couldn''t find it... Hell, when I''m writing C++
code under 500 lines I''ll often write my classes like I would in C#.

I personally do not want to go back to these days, I would risk saying that
it wasn''t overlooked but turned down inherently.

I guess I jsut don''t like header files...I wonder what others think.

"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:%2******************@TK2MSFTNGP11.phx.gbl...

C# is great but it does have some short comings. Here, I examine one of them which I definitely think is a shortcoming.
Coming from C++, there seems to be no equivalent in C# to separate code
cleanly for the user''s benefit. Why is this important? Because a user gets
to maintain this code, not a machine. C++ exposed us to header files which
was a way, among other things, to cleanly separate class implementation from declaration. Why was this overlooked in C#? Mixing implementation and
declaration inside a class is so ugly. Yuck!

Sure intellisense can take you a long way, but it''s a bandaid on a bruise.
Though it is possible to separate classes out into namespaces in C# you
still have to port the implementation with it. Yuck! A class can be
conceived without an implementation, if only for discussion purposes. You
are not always interested in the implementation, that is why it is so yucky. What if you want to take the class function declarations with you to a
meeting to talk about your new class? This does actually happen quite
frequently. You can''t do that in C# without intimately knowing the cut and
paste editor. Intellisense can''t help you there. A class has meaning outside of the canvas it was carved on. A class does exist outside of the visual
studio GUI. Do not forget, there is no intellisense at the command line.
Probably higher level UML tools in C# builder will fit the bill, but that''s not the point. It should be part of the language implementation because
developers get to maintain that code. It''s even more troublesome if these
UML solutions are not included in the box.

We''ve all gotten used to this mess, and if you come from Java, you''ve always had it so it seems odd to be without it. But it doesn''t make it right. There is (make that was) a better way. I remember that time when when
implementation and declaration were different beasts. Sure the compiler
could care less if the implementation was on the moon and declaration on
mars, but then again, a machine does not usually get to maintain code right? So it was never about the machine. It''s about making life easy for
developers. C# has failed in this regard. A more difficult life maintaining code means less productivity. Yes, it does make me less productive if I need to figure out the moving parts of a class.

I feel better now after venting.

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits



Not having been a C++ programmer, I wonder if they promote a kind of
Stockholm Syndrome in their long-term users - you have to work with them so
much and so long that you start to feel for them and sympathize with them
until you finally can''t live without them.

I have a difficult time imagining headers are better for separating
definition from implementation than an abstract class or interface. Both
are perfectly usable in the real world and both affect the total separation
of implementation from structure.

Richard

--
Veuillez m''excuser, mon Fran?ais est très pauvre. Cependant, si vous voyez
mauvais C #, c''est mon défaut!
"Daniel O''Connell" <onyxkirx@--NOSPAM--comcast.net> wrote in message
news:lq0ob.59629


Fm2.42234@attbi_s04...

Interesting, one of my favorite features of C#(and java, I suppose) was the death of the header file.

I recently had to go write a MC++ class and got a reminder on how annoying
it was to have to double define methods, to have parameter lists and return types defined in TWO places, or my favorite in C, where if you forgot to
define a method the compiler couldn''t find it... Hell, when I''m writing C++ code under 500 lines I''ll often write my classes like I would in C#.

I personally do not want to go back to these days, I would risk saying that it wasn''t overlooked but turned down inherently.

I guess I jsut don''t like header files...I wonder what others think.

"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:%2******************@TK2MSFTNGP11.phx.gbl...

C# is great but it does have some short comings. Here, I examine one of


them

which I definitely think is a shortcoming.
Coming from C++, there seems to be no equivalent in C# to separate code
cleanly for the user''s benefit. Why is this important? Because a user gets to maintain this code, not a machine. C++ exposed us to header files which was a way, among other things, to cleanly separate class implementation


from

declaration. Why was this overlooked in C#? Mixing implementation and
declaration inside a class is so ugly. Yuck!

Sure intellisense can take you a long way, but it''s a bandaid on a bruise. Though it is possible to separate classes out into namespaces in C# you
still have to port the implementation with it. Yuck! A class can be
conceived without an implementation, if only for discussion purposes. You are not always interested in the implementation, that is why it is so


yucky.

What if you want to take the class function declarations with you to a
meeting to talk about your new class? This does actually happen quite
frequently. You can''t do that in C# without intimately knowing the cut and paste editor. Intellisense can''t help you there. A class has meaning


outside

of the canvas it was carved on. A class does exist outside of the visual
studio GUI. Do not forget, there is no intellisense at the command line.
Probably higher level UML tools in C# builder will fit the bill, but


that''s

not the point. It should be part of the language implementation because
developers get to maintain that code. It''s even more troublesome if these UML solutions are not included in the box.

We''ve all gotten used to this mess, and if you come from Java, you''ve


always

had it so it seems odd to be without it. But it doesn''t make it right.


There

is (make that was) a better way. I remember that time when when
implementation and declaration were different beasts. Sure the compiler
could care less if the implementation was on the moon and declaration on
mars, but then again, a machine does not usually get to maintain code


right?

So it was never about the machine. It''s about making life easy for
developers. C# has failed in this regard. A more difficult life


maintaining

code means less productivity. Yes, it does make me less productive if I


need

to figure out the moving parts of a class.

I feel better now after venting.

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits




这篇关于C#代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆