UNIX,C,Perl [英] UNIX, C, Perl

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

问题描述

鉴于UNIX,包括网络,几乎完全用C语言编码,

为什么在普通的C中几乎不可能有这么多东西?示例:

网络和Internet访问,访问UNIX进程间控制和

通信,区域设置确定,EBCDIC / ASCII区分等。


Perl中几乎所有这些都很容易。为什么没有类似

perl模块的机制来容易扩展这些设施?不是吗?b $ b任何人都在解决这个问题吗?还是全部留给专有的

系统?

解决方案

Pilcrow写道:


鉴于UNIX(包括网络)几乎完全用C语言编码,

为什么在普通的C中几乎不可能有这么多东西?示例:

网络和Internet访问,访问UNIX进程间控制和

通信,...



它们在普通C中并非不可能,严格来说它们是不可能的符合C.操作系统编写的C将使得高度非高效使用

这些东西可以访问所有

的构造。在某些情况下,那些非可移植的构造将包含用汇编语言编写的例程的调用
或内联汇编

语言,但是很大一部分是系统可以完全用非便携式C写成



...现场确定,EBCDIC / ASCII识别等等。



我一点也不清楚为什么你认为那些不能执行的东西

普通的C.什么功能都是你要求的不是由

< locale.h>?也许如果您更详细地描述了所需的

功能,我可以更好地解决这个问题。


几乎所有这些在Perl中都很容易。为什么没有类似

perl模块的机制来容易扩展这些设施?



有这样的机制 - 它们被称为头文件。和

" libraries",它们一起用于非常相似的目的。


...不是

有人在处理这个问题吗?还是全部留给专有的

系统?



没有理由为什么这些库必须是专有的,尽管很多

肯定是。


Pilcrow写道:


鉴于UNIX,包括网络,几乎完全用C编码,

如何来普通C来这么多东西几乎是不可能的?示例:

网络和Internet访问,访问UNIX进程间控制和

通信,区域设置确定,EBCDIC / ASCII区分等。


Perl中几乎所有这些都很容易。为什么没有类似

perl模块的机制来容易扩展这些设施?不是吗?b $ b任何人都在解决这个问题吗?还是全部留给专有的

系统?



编程语言应该为所有

设置标准吗?应用领域可以使用吗?


-

Eric Sosman
es ***** @ ieee-dot-org.inva 盖子




Eric Sosman< es ***** @ ieee-dot- org.invalidwrote in message

news:2u ****************************** @ comcast.com 。 ..


Pilcrow写道:


UNIX,包括网络,几乎完全用C语言编码,

为什么在普通的C中几乎不可能有这么多东西?示例:

网络和Internet访问,访问UNIX进程间控制和

通信,区域设置确定,EBCDIC / ASCII区分等。


Perl中几乎所有这些都很容易。为什么没有类似

perl模块的机制来容易扩展这些设施?不是吗?b $ b任何人都在解决这个问题吗?还是全部留给专有的

系统?



编程语言应该为所有

设置标准吗?应用程序领域可以使用它吗?



Sun Microsystems:你有好处!!!


Java,计算机编程语言的世界语。 。


---

William Ernest Reid


Given that UNIX, including networking, is almost entirely coded in C,
how come so many things are almost impossible in ordinary C? Examples:
Network and internet access, access to UNIX interprocess controls and
communication, locale determination, EBCDIC/ASCII discrimination, etc.

Almost all of these are easy in Perl. Why isn''t there a mechanism like
perl modules to allow easy extentions for facilities like these? Isn''t
anyone working on this problem? or is it all being left for proprietary
systems?

解决方案

Pilcrow wrote:

Given that UNIX, including networking, is almost entirely coded in C,
how come so many things are almost impossible in ordinary C? Examples:
Network and internet access, access to UNIX interprocess controls and
communication, ...

They are not impossible in "ordinary C", they are impossible in strictly
conforming C. The C that operating systems are written in will make
heavy use of highly non-portable constructs that give access to all of
these things. In some cases, those non-portable constructs will consist
of calls to routines written in assembly language, or in-line assembly
language, but a very large fraction of the system can be written
entirely in non-portable C.

... locale determination, EBCDIC/ASCII discrimination, etc.

I''m not at all clear to me why you think that those can''t be performed
in ordinary C. What features are you asking for that aren''t provided by
<locale.h>? Perhaps if you described in more detail the desired
functionality I could address the question better.

Almost all of these are easy in Perl. Why isn''t there a mechanism like
perl modules to allow easy extentions for facilities like these?

There are such mechanisms - they are called "header files" and
"libraries", and together they serve a very similar purpose.

... Isn''t
anyone working on this problem? or is it all being left for proprietary
systems?

There''s no reasons why the libraries have to be proprietary, though many
certainly are.


Pilcrow wrote:

Given that UNIX, including networking, is almost entirely coded in C,
how come so many things are almost impossible in ordinary C? Examples:
Network and internet access, access to UNIX interprocess controls and
communication, locale determination, EBCDIC/ASCII discrimination, etc.

Almost all of these are easy in Perl. Why isn''t there a mechanism like
perl modules to allow easy extentions for facilities like these? Isn''t
anyone working on this problem? or is it all being left for proprietary
systems?

Should a programming language set standards for all
the application arenas in which it can be used?

--
Eric Sosman
es*****@ieee-dot-org.invalid



Eric Sosman <es*****@ieee-dot-org.invalidwrote in message
news:2u******************************@comcast.com. ..

Pilcrow wrote:

Given that UNIX, including networking, is almost entirely coded in C,
how come so many things are almost impossible in ordinary C? Examples:
Network and internet access, access to UNIX interprocess controls and
communication, locale determination, EBCDIC/ASCII discrimination, etc.

Almost all of these are easy in Perl. Why isn''t there a mechanism like
perl modules to allow easy extentions for facilities like these? Isn''t
anyone working on this problem? or is it all being left for proprietary
systems?


Should a programming language set standards for all
the application arenas in which it can be used?

Sun Microsystems: "YOU BETCHA!!!"

Java, the Esperanto of computer programming languages...

---
William Ernest Reid


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

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