JavaScript 和 C++ 是否太相似而无法同时学习?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11963315/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Are JavaScript and C++ too similar to learn at the same time?
提问by Borodin
I'm new to both web design and programming. I started learning C++ about four months ago and I just started learning web design about a week ago.
我是网页设计和编程的新手。我大约四个月前开始学习 C++,大约一周前我才开始学习网页设计。
Even though I've been doing web design for only about a week I feel that I am more than proficient in XHTML, so I decided after XHTML I'd learn JavaScript and then HTML5.
虽然我只做了一周左右的网页设计,但我觉得我对 XHTML 非常精通,所以我决定在 XHTML 之后我学习 JavaScript,然后学习 HTML5。
The reason I started to learn web design is because I wanted to learn something new, but because I only started C++ four months ago I didn't want to confuse myself by learning another programming language.
我开始学习网页设计的原因是因为我想学习一些新的东西,但是因为我四个月前才开始使用 C++,所以我不想通过学习另一种编程语言来迷惑自己。
The problem now is that I started learning JavaScript and saw that the syntax seems kind of similar to C++. I realize that one is a scripting language and the other is not, but my question is: for someone with my experience would this be too confusing? Or will I be fine learning them both at the same time?
现在的问题是,我开始学习 JavaScript 并发现其语法似乎有点类似于 C++。我意识到一种是脚本语言而另一种不是,但我的问题是:对于有我经验的人来说,这会不会太混乱?或者我可以同时学习它们吗?
回答by Borodin
Don't be fooled. After four months of C++ and a week of HTML you are proficient in neither.
不要被愚弄。在学习了四个月的 C++ 和一周的 HTML 之后,您对这两者都不精通。
Your direction depends on which way you want to go. C++ is pretty much useless in the area of web design.
你的方向取决于你想走哪条路。C++ 在网页设计领域几乎毫无用处。
If you want to design web sites then stick with the HTML that you know and learn it inside out. Supplement that with CSS when you feel ready and lastly JavaScript.
如果您想设计网站,请坚持使用您所了解的 HTML 并彻底学习。当你准备好时,用 CSS 补充,最后是 JavaScript。
If you want to write generic applications then pursue C++ and learn about all of its possible environments and applications.
如果您想编写通用应用程序,请学习 C++ 并了解其所有可能的环境和应用程序。
Once you can confidently answer most questions on a subject that appear on Stack Overflow then you can consider yourself proficient, but please don't under-estimate the task: it will take you many years
一旦您可以自信地回答出现在 Stack Overflow 上的大多数问题,那么您就可以认为自己精通了,但请不要低估这项任务:这将花费您很多年
回答by Abhinav
If you are new to programming, then stick to C++ right now. Otherwise Javascript and C++ should be easy to learn together, most of the syntax is same except object orientation. Some nuances of Javascript might seem a little odd for someone working with C++. I personally think both can be learnt together.
如果您是编程新手,那么现在就坚持使用 C++。否则 Javascript 和 C++ 应该很容易一起学习,除了面向对象之外,大多数语法都相同。对于使用 C++ 的人来说,Javascript 的一些细微差别可能看起来有点奇怪。我个人认为两者可以一起学习。