开发者

Javascript or Python? beginner getting up to speed [closed]

开发者 https://www.devze.com 2022-12-30 22:22 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

Which language will allow a beginner to get开发者_开发百科 up to speed quicker?

Basically which language of the two is easier to learn


Python is more regular, and has not needed to keep supporting every old, redundant feature forever, as Javascript has been forced to do (in order to keep supporting existing sites): these are issues that can make Python easier to learn.

However, Javascript's not too bad, especially if you can choose a reasonably rigid, modular, clean framework such as dojo (if you have to learn about every popular JS framework, or even most of them, it will, however, be a nightmare -- as it will if you have to learn the subtle bugs and incompatibilities of various browsers' implementations of JS and the DOM, rather than getting them covered up by such frameworks as dojo, jquery, or closure).

For learning Javascript, I recommend supplementing whatever tutorial you choose with Crockford's Javascript: the good parts -- it's a very thin book (which sounds like a joke, but it's true!-), fast and easy to read, and stops you from wasting your time on language features that are misconceived, too badly designed to use, or counterproductive. Crockford is a real JS guru and is well worth reading and paying attention to.


Depends what you want to do. If you're just interested in learning a programming language, I would recommend Python because:

  • The interactive prompt is great for learning a language
  • It's simple and well-designed, whereas JavaScript has a number of design flaws that can be confusing to newbies
  • There is a particularly high amount of introductory materials for Python.
  • It allows you to do all kinds of programming (server, client, games, etc.), whereas JS will limit you a bit more.


They're both pretty straightforward to learn. They more differ in terms of their typical project space - Javascript is usually utilized more for the client-side portion of web applications, while Python is often utilized for the server side of web applications and also standalone non-web apps.

What do you want to make?


The two languages are used for two completely different purposes. JavaScript does work in the browser,1 Python does work everywhere else. Pick the language based on which you want; it's useless to learn a language if you can't even use it for your project. If you want to make a website, for example, you'll have to learn both--JavaScript for the client and Python for the server.

Regardless, to answer your question, both languages are great but I'd say Python is easier to start with. JavaScript's basics are fine, but it features a lot of advanced concepts that you shouldn't have to deal with when learning your first language, IMO.

1. Yes, I'm aware that you can use JavaScript on the server-side, but those implementations are not mature and certainly not for a beginner. Python is much more suited for that kind of thing.


PHP is my thing, but I've played with Python and worked with JS. Being only somewhat skilled in both languages, Python feels nice and clean (although a little wierd) with the forced tabbing conventions and lack of semicolons. JS, on the other hand makes me feel like I need a shower. Especially after debugging in IE.

But the only real answer is the question - What do you want to do with it? Want to make websites do cool things in the browser? Go with JS. Something else? Maybe Python is better suited, as @Amber said.

Edit: As for getting up to speed, here's how it works. Your first language takes you a longer time to learn. Your second takes much less time, and after that it's not long at all since you're mostly just learning new syntax for similar things. So the solution for getting up to speed faster is to jump in right now.


I would say JavaScript is easy to learn. I had to learn it to program the Karotz. It only took about 2 months of Youtube tutorials to learn most of it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号