编程新手 [英] New to Programming

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

问题描述

大家好,


我是计算机和编程的完全新手,现在,所有

i需要知道的是为什么很多人喜欢C到C ++?它只是

,因为他们习惯使用C而且保守地将

切换到C ++还是有其他原因吗?


其次,你能告诉我C的知识将如何帮助我

以后?我有一位老师,他只是对这个问题嗤之以鼻。

回答说C的知识会帮助我以后学习其他高级的

语言......这是真的吗?


提前感谢您的帮助,


问候,

SG。

Hi everyone,

I am a complete novice at computers and programming and right now, all
i need to know is that why do many people prefer C to C++? Is it just
because they are used to using C and are conservative about switching
over to C++ or is there some other reason?

Secondly, could you please tell me how the knowledge of C will help me
later on? I have a teacher here who just shrugged at this question and
replied that the knowledge of C will help me learn the other advanced
languages later on... Is this true?

Thank You for your help in advance,

Regards,
SG.

推荐答案

SG写道:
SG wrote:

我是计算机和编程的完整新手现在,所有

i需要知道的是,为什么许多人更喜欢C到C ++?它只是

,因为它们习惯使用C并且保守地将

转换为C ++还是有其他原因吗?
I am a complete novice at computers and programming and right now, all
i need to know is that why do many people prefer C to C++? Is it just
because they are used to using C and are conservative about switching
over to C++ or is there some other reason?



我猜有很多原因,但对我来说,如果我想在

中编程一个面向对象的 ;风格,我会选择一个小的语言,它可以正确地使用它(例如python),而不是一些大的臃肿的怪物,包括厨房水槽投入的一切。或者,在

维基百科中说:很多人都认为C ++已经扩展到了

的不优雅点。

I''d guess there are many reasons, but for me, if I want to program in
an "object-oriented" style, I''ll choose a small language that does it
properly (e.g. python), not some big bloated monstrosity with
everything including the kitchen sink thrown in. Or, in
wikipedia-speak: "Many people think that C++ has been extended to the
point of inelegance."


其次,你能告诉我C的知识将如何帮助我

以后?我有一位老师,他只是对这个问题嗤之以鼻。

回答说C的知识会帮助我以后学习其他高级的

语言......这是真的吗?
Secondly, could you please tell me how the knowledge of C will help me
later on? I have a teacher here who just shrugged at this question and
replied that the knowledge of C will help me learn the other advanced
languages later on... Is this true?



是的,在某种程度上。但它肯定会让你深入了解

当你的程序运行时内部会发生什么,其他语言试图向你隐瞒许多b
取得了不同程度的成功。


格伦

Yes, to a certain extent. But it will certainly give you insight into
what''s going on internally when your program''s being run, which many
other languages try to hide from you (with varying degrees of success).

Glenn




SG写道:

SG wrote:

>

我是计算机和编程的完全新手,现在,所有

i需要知道为什么很多人喜欢C到C ++?它只是

,因为它们习惯使用C并且保守地将

转换为C ++还是有其他原因吗?
>
I am a complete novice at computers and programming and right now, all
i need to know is that why do many people prefer C to C++? Is it just
because they are used to using C and are conservative about switching
over to C++ or is there some other reason?



一个措辞奇怪的段落。很多人喜欢C到C ++吗?如果他们这么做,或许他们发现它更适合他们想做的事情。我使用C

并且我不使用C ++,但我不认为我喜欢 C到C ++;我也没有使用

a链锯,但我不喜欢C链锯。


喜欢C ++到C的人只是保守地将
转换为C还是有其他原因吗?

A strangely worded paragraph. Do many people prefer C to C++? If they
do, perhaps they find it better suited to what they want to do. I use C
and I don''t use C++, but I don''t think I "prefer" C to C++; I don''t use
a chain saw either, but I don''t prefer C to a chain saw.

Are people who prefer C++ to C just conservative about switching over
to C or is there some other reason?


其次,你能告诉我C的知识吗?会帮助我

以后?
Secondly, could you please tell me how the knowledge of C will help me
later on?



它可能会帮助你找到需要你知道C的工作,对于

的开始。

It will likely help you get jobs which require you to know C, for
starters.


我这里有一位老师,只是对这个问题耸耸肩,

回答说C的知识会帮助我以后学习其他高级的

语言在...这是真的吗?
I have a teacher here who just shrugged at this question and
replied that the knowledge of C will help me learn the other advanced
languages later on... Is this true?



非常可能;你知道的语言越多,就越容易学习别人(只要你能避免让他们感到困惑)。

Very likely; the more languages you know, the easier it''s likely to be
to learn others (as long as you can avoid getting them confused).


SG说:
SG said:

大家好,


我是计算机和编程的新手而现在,所有需要知道的是,为什么许多人更喜欢C到C ++?它只是

,因为它们习惯使用C并且保守地将

转换为C ++还是有其他原因吗?
Hi everyone,

I am a complete novice at computers and programming and right now, all
i need to know is that why do many people prefer C to C++? Is it just
because they are used to using C and are conservative about switching
over to C++ or is there some other reason?



人们在回答这个问题时通常会说:速度,

便携性,以及与机器的接近程度。虽然那些是重要的因素,但C和C ++之间的区别实际上并不是非常重要的

。不过,C无疑是一种更小更简单的语言,对于一些来说非常重要。


但我认为最引人注目的原因是一般性的观点使用

语言,它的优势在于解释了为什么许多人更喜欢C ++

到C,或者语言< footo language< bar>。 />

语言既反映又塑造了我们思考的方式。那些以特定方式思考

编程的人往往倾向于选择语言来促进将这种思维转化为源代码。这枚硬币的另一面

也是相关的 - 那些在相当长的时间内支持

特定语言的人会发现他们的方法
$ b编程的$ b已被该语言所塑造。这并不代表他们

不能使用其他语言,但这确实意味着他们倾向于首先达到* b $ b * *的语言 - 对于*他们* - 轻松地按照他们的方式坐下来b
考虑构建程序。


我七年左右的主要语言是BASIC(哎哟,对吗?)。

当我第一次开始学习C时,我不断地将它与BASIC进行比较

(不利)。但是,在一个特定的日子里,我学会了

结构(我一直试图在BASIC中自己发明了相当于

)和文件处理功能。我一直在学习

文件处理,因为我知道它在BASIC中是什么猪 - 但在C,WOW中,这个

很容易!从那时起,C开始在我的脑海中形成一种完美的语言。


1990年,我遇到了一种语言/专家系统组合称为Guru。它是
就像是BASIC,C和SQL之间的交叉(如果你忽略了复杂的

位),虽然我之前从未遇到过SQL,但是发现Guru很好

易于学习和使用。在开始的一个月左右的时间里,我赢了

对老手的技术论证 - 语言与我坐得很好,并且

我最后写了一些非常优雅的功能强大的程序。事实上,

我想念Guru。它就像一个老朋友,我希望(但不要指望,唉)

有一天会再见面。我之所以提到它的原因是它与C ++有一些相似之处 - 也就是说,就好像有人拿走了C并且加入了

巨大的块 - 数据库访问,内置电子表格,专家系统,

图形,所有类型的东西 - 和语法混乱,直到它是几乎无法识别的
- 然而他们的方式我完成它仍然符合我想的编程方式。


我在1991年开始学习C ++(开关),它感到困惑我。当然,我已经很大程度上克服了这一点,当然,我发现STL很有吸引力,但我看一些人的C ++程序和他们只是看起来很陌生。我必须*理解这样的

程序,因为他们似乎非常高兴使用特定的

类似的奇怪语法。 Guru也使用了奇怪的语法,但它是*我的

种类*奇怪的语法,所以我不介意。但C ++编写的C ++向导

看起来并不奇怪 - 它看起来很奇怪*!


然而一个C ++向导看起来很苛刻在我身上做出这样的反应,因为他或者b $ b b或者她会认为这样的语法是完全正常的。 C ++向导''

思想过程已经在某种程度上受到了C ++的影响,而且我也会认为他们最初的关注点在很多情况下来源于

所以 - 这是课程的马匹。或者大脑的车道,如果你愿意的话。

The usual reasons people tout in answer to this question are: speed,
portability, and closeness to the machine. Whilst those are important
factors, the difference between C and C++ isn''t actually very significant
in those terms. C is undoubtedly a smaller and simpler language, though,
and for some that is rather important.

But I think the most compelling reason is a general point to do with
language, and it has the advantage of explaining why many people prefer C++
to C, or indeed language <footo language <bar>.

Language both reflects and shapes the way we think. Those who think about
programming in a particular way will tend to prefer languages that
facilitate the conversion of that kind of thinking into source code. The
opposite side of that coin is also relevant - those who have favoured a
particular language for a fair amount of time will find that their approach
to programming has been shaped by that language. That doesn''t mean they
can''t use other languages, but it does mean that they will tend to reach
*first* for the language that - for *them* - sits easily with the way they
think about constructing programs.

My principal language for a good seven years or so was BASIC (ouch, right?).
When I first started learning C, I was constantly comparing it
(unfavourably) to BASIC. But then, on one particular day, I learned about
structs (which I had been trying to invent by myself in BASIC for quite a
while) and the file-handling functions. I had been dreading learning about
file-handling, since I knew what a pig it is in BASIC - but in C, WOW, this
was easy! And from that point on, C started to shape up in my mind as a
decent language after all.

In 1990, I came across a language/expert-system combination called Guru. It
was like a cross between BASIC, C, and SQL (if you ignored the complicated
bits), and although I''d never come across SQL before, I found Guru very
easy to learn and use. Within a month or so of beginning it, I was winning
technical arguments against old hands - the language sat well with me, and
I ended up writing some very elegant and powerful programs in it. In fact,
I miss Guru. It''s like an old friend that I hope (but do not expect, alas)
to meet again some day. The reason I mention it is that it shares certain
similarities with C++ - that is, it''s as if someone had taken C and added
huge chunks to it - database access, built-in spreadsheet, expert system,
graphics, all kind of stuff - and messed with the syntax until it was
almost unrecognisable - and yet the way they''d done it still matched the
way I think about programming.

I started learning C++ (on and off) in about 1991, and it baffled me. I''ve
largely got over that now, of course, and certainly I find the STL to be
rather attractive, but I look at some people''s C++ programs and they just
look completely alien to me. I have to *work* at understanding such
programs, because they seem positively to rejoice in using a particular
kind of rather weird syntax. Guru used weird syntax too, but it was *my
kind* of weird syntax, so I didn''t mind. But C++ as written by a C++ wizard
doesn''t just look weird - it looks *bizarre*!

And yet a C++ wizard will look askance at me for such a reaction, because he
or she will consider such syntax to be perfectly normal. C++ wizards''
thought processes have been shaped by C++ to some extent, and I would also
argue that their initial affinity with it stemmed in many cases from the
fact that it reflected the way they already thought about programming.

So - it''s horses for courses. Or lanes for brains, if you prefer.


其次,你能否告诉我C的知识将如何帮助我

以后?
Secondly, could you please tell me how the knowledge of C will help me
later on?



即使假设你不想成为C程序员也是如此。 (在

的意义上,它是你选择的语言,用C等写作获得报酬等),

有几个原因可以解释为什么它会对你有益你:


首先,C将让你深入了解其他语言必须做的工作

引擎盖下,因为那里没有很多关于C的引擎盖。


其次,许多关于通用编程的重要书籍使用C作为他们的

示例代码。经典的例子是Dragon Book,它教你如何编写编译器,但是还有很多其他的编写器。还有W Richard

史蒂文斯在Unix上的书籍,全都是他们自己学习的一系列令人信服的理由。因此能够阅读这门语言非常宝贵

一般来说。


第三,几乎所有平台(我知道没有严重的例外)都有一个C

编译器可用于对于某些人来说,这是唯一现实的选择。

如果你想为只支持C的平台编写代码,那么你就可以用C写入
或者为这个平台编写自己的翻译 - 用C语言!


HTH。手。


-

Richard Heathfield

Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk

电子邮件:rjh在上面的域名(但显然放弃了www)

Even assuming that you don''t want to be "a C programmer" (in the sense of
making it your language of choice, getting paid for writing in C, etc etc),
there are several reasons why knowing it will be beneficial to you:

Firstly, C will give you insight into the work other languages have to do
"under the hood", because there ain''t much hood where C is concerned.

Secondly, many important books on general programming use C for their
example code. The classic example is the "Dragon Book", which teaches you
how to write compilers, but there are many others too. And the W Richard
Stevens books on Unix form, all by themselves, a whole series of compelling
reasons to learn C. Being able to read the language is therefore invaluable
in general terms.

Thirdly, almost all platforms (I know of no serious exceptions) have a C
compiler available for them, and for some it''s the only realistic choice.
If you want to write code for a platform that only supports C, then you
either write in C or write your own translator for that platform - in C!

HTH. HAND.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)


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

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