c#这么容易吗?比c更容易?再想想... [英] Is c# so easy? Easier than c? Think again...

查看:81
本文介绍了c#这么容易吗?比c更容易?再想想...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



主题:dotnet是一场闹剧。


你知道,我总是对

留下深刻的印象用c#或java编写一个http程序

。对我来说,它显示了

''优越''这些语言是因为

他们让它变得如此轻松来

设置连接点,打开一个插座,

发送请求。


但是,我真的不知道怎么做
$ b $公元前!所以我没有把它与任何东西进行比较。

然后,我昨天收到了我的四本新的

书中的一本,''高级Linux编程''来自New Riders的
,还有一些样本

代码用于打开套接字并阅读

http数据。


这就像在C#中一样!!!!!!


如果有的话,它会越来越优雅。


告诉我:


connect(socket_fd,& name,sizeof(struct sockaddr_in))


a单行设置接下来的连接

通过while循环来读取数据不是

同样的语法同样在c#做同样的事情。

请参阅 - UNIX一直有''ASSEMBLIES''或SYSCALLS


- 或操作系统级别的图书馆和方法


DOT NET是一个FARCE(!)(!)(!)(!)(!)


Subject: dotnet is a farce.

You know, I was always impressed with
the way one could write a http program
with c# or java. To me, it showed how
''superior'' these languages are because
they made it so ''easy'' to
set up connection points, open a socket,
send the request.

But, I never really know how to do it in
c! So I wasn''t comparing it with anything.
Then, I just received one of my four new
books yesterday, ''Advanced Linux Programming''
from New Riders, and there was some sample
code for opening a socket and reading
http data.

IT''S THE SAME THING AS IN C# !!!!!!

If anything, it''s less and more elegant.

Tell me that:

connect(socket_fd, &name, sizeof( struct sockaddr_in))

a SINGLE line that sets up the connection followed
by a while loop to read the data is not
THE SAME EXACT SYNTAX as in c# for doing the same thing.

See -- UNIX has always had ''ASSEMBLIES'' -- or SYSCALLS

-- or OPERATING SYSTEM LEVEL LIBRARIES AND METHODS

DOT NET IS A FARCE (!)(!)(!)(!)(!)

推荐答案

请,继续po这样的东西。

非常令人耳目一新。


Miha


" jbailo" < JA ***** @ earthlink.net>在消息中写道

news:31 ****************************** @ news.teranew s。 com ...
Please, do continue posting stuff like this.
It is very refreshing.

Miha

"jbailo" <ja*****@earthlink.net> wrote in message
news:31******************************@news.teranew s.com...

主题:dotnet是一场闹剧。

Subject: dotnet is a farce.



" jbailo" < JA ***** @ earthlink.net>写道:
"jbailo" <ja*****@earthlink.net> writes:
主题:dotnet是一个闹剧。

你知道,我总是对
写一个http程序的方式印象深刻
使用c#或java。对我而言,它显示了这些语言是如何优越的,因为它们使得设置连接点,打开插座这么容易,
发送请求。


这主要是图书馆的相对优势,

而不是语言。


与C相比,C#或Java的_language_优势主要是以下几点:更大的确定性和安全性(即大多数没有大量的b / b
未指明和未定义的行为整个C),

自动内存管理(垃圾收集),更好地支持

封装和OOP,以及异常处理。

但是,我从来没有真正知道如何在c中做到这一点!
....它和C#一样...... !!!!!!


显然你还是不知道。

告诉我:

connect(socket_fd,& name,sizeof (struct sockaddr_in))

一个设置连接的SINGLE行跟着
一个while循环来读取数据不是和c#中的相同的同义词一样用来做一样。


不是。那一行C代码将*默默地忽略任何失败*。

我很确定相应的C#或Java代码会抛出

异常,确保失败将由

来电者处理或最终报告给用户。

DOT NET是一个FARCE(!)(!)(!)(!)( !)
Subject: dotnet is a farce.

You know, I was always impressed with
the way one could write a http program
with c# or java. To me, it showed how
''superior'' these languages are because
they made it so ''easy'' to
set up connection points, open a socket,
send the request.
That is mainly a matter of the relative strengths of the libraries,
rather than the language.

The _language_ advantages of C# or Java compared with C are mainly the
following: greater determinism and safety (i.e. the absence of most of
the unspecified and undefined behaviour which is rife throughout C),
automatic memory management (garbage collection), better support for
encapsulation and OOP, and exception handling.
But, I never really know how to do it in c! ....IT''S THE SAME THING AS IN C# !!!!!!
Apparently you still don''t know.
Tell me that:

connect(socket_fd, &name, sizeof( struct sockaddr_in))

a SINGLE line that sets up the connection followed
by a while loop to read the data is not
THE SAME EXACT SYNTAX as in c# for doing the same thing.
It''s not. That single line of C code will *silently ignore any failures*.
I''m pretty sure the corresponding C# or Java code would throw an
exception, ensuring that the failure will either be dealt with by the
caller or eventually reported to the user.
DOT NET IS A FARCE (!)(!)(!)(!)(!)




跳过这个结论并没有太大的帮助,是吗?


-

Fergus Henderson< fj*@cs.mu.oz.au> | 我一直都知道这一追求

墨尔本大学|卓越是一种致命的习惯

WWW:< http://www.cs.mu.oz.au/~fjh> | - TS Garp的最后一句话。



It didn''t take much for you to leap to that conclusion, did it?

--
Fergus Henderson <fj*@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.


请不要给巨魔喂食。

2003年11月5日星期三15: 02:22 GMT,Fergus Henderson< fj*@cs.mu.oz.au>

写道:
pls, don''t feed the troll.
On Wed, 05 Nov 2003 15:02:22 GMT, Fergus Henderson <fj*@cs.mu.oz.au>
wrote:
" jbailo" < JA ***** @ earthlink.net>写道:
"jbailo" <ja*****@earthlink.net> writes:
主题:dotnet是一个闹剧。

你知道,我总是对
写一个http程序的方式印象深刻
使用c#或java。对我而言,它显示了这些语言是如何优越的,因为它们使得设置连接点,打开插座这么容易,
发送请求。
Subject: dotnet is a farce.

You know, I was always impressed with
the way one could write a http program
with c# or java. To me, it showed how
''superior'' these languages are because
they made it so ''easy'' to
set up connection points, open a socket,
send the request.



这主要是图书馆相对优势的问题,而不是语言。

_language_优点与C相比,C#或Java主要是以下内容:更大的确定性和安全性(即缺少大部分未指定和未定义的行为,这些行为在整个C中很普遍),
自动内存管理(垃圾收集),更好地支持封装和OOP,以及异常处理。



That is mainly a matter of the relative strengths of the libraries,
rather than the language.

The _language_ advantages of C# or Java compared with C are mainly the
following: greater determinism and safety (i.e. the absence of most of
the unspecified and undefined behaviour which is rife throughout C),
automatic memory management (garbage collection), better support for
encapsulation and OOP, and exception handling.

但是,我真的不知道如何在c中做到这一点!
But, I never really know how to do it in c!


...

它与C#相同...... !!!!!!
IT''S THE SAME THING AS IN C# !!!!!!



显然你还是不知道。



Apparently you still don''t know.

告诉我:

connect(socket_fd,& name,sizeo f(struct sockaddr_in))

一个单行设置连接跟着
一个while循环来读取数据不是和c#一样完全相同的做法同样的事情。
Tell me that:

connect(socket_fd, &name, sizeof( struct sockaddr_in))

a SINGLE line that sets up the connection followed
by a while loop to read the data is not
THE SAME EXACT SYNTAX as in c# for doing the same thing.



它不是。那一行C代码将*默默地忽略任何失败*。
我很确定相应的C#或Java代码会抛出一个
异常,确保失败将由
调用者或最终向用户报告。



It''s not. That single line of C code will *silently ignore any failures*.
I''m pretty sure the corresponding C# or Java code would throw an
exception, ensuring that the failure will either be dealt with by the
caller or eventually reported to the user.

DOT NET是一个FARCE(!)(!)(!)(!)(!)
DOT NET IS A FARCE (!)(!)(!)(!)(!)



你跳过这个结论并没有太大的帮助,是吗?



It didn''t take much for you to leap to that conclusion, did it?






这篇关于c#这么容易吗?比c更容易?再想想...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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