J’aurais plutôt écrit “Et je n’ai aucun problème avec le Français”. S’il te plait, ne massacre pas ma langue natale.
Translation: I would rather have written “And I have no problem with French.” Please, do not slaughter my mother tongue.
I have only a little experience in JavaScript but I agree with longino. There are a lot of nice APIs in JavaScript but I find it harder to debug and harder to maintain than Java. Making something really object oriented in this language requires some more efforts, it has nothing to do with only writing its own methods, you’re not fair with longino. I suffered a lot on Elixir, a SDK for ADSL top boxes provided by the Internet service provider Free… I don’t find this language really interesting, I understand that some people like it, it does not surprise me but I just hope I won’t be forced to maintain a very large source code in this language as I feel more comfortable with statically typed languages.
Je suis désolé… although, had it been you making a mistake in Portuguese, my native language, I’d not rush to call it slaughter.
But wait, don’t compare JS and Java… points on JS are taken, but a “large codebase” of JS would only be accepted at front-end centric web apps, with little to no delegation to server side code.
One place they are useful is if your not sure you’ll be receiving a number, or a string representation of a number, or either (i.e. “1.0” == 1.0). For that, it’s useful.
That’s not something you should be doing. It makes everything more complicated. Now you have to document that it also accepts strings. For the sake of symmetry, lots of other functions now also have to accept strings. (Why the f- would anyone want to pass numbers around as strings anyways?)
Also, that “1.0” == 1.0 example is kinda unusual. FWIW, I’d write something like that as +foo === 1 (coerce to Number and then check if that number is 1).
Well, that is if I would allow numbers as strings. I don’t. It’s always a bug. See some number in quotes somewhere? That’s a bug. Fix it.
If it’s some text input from somewhere else, I turn it into a number right away. I won’t even store the original string anywhere. I don’t have any use for it.
Javascript’s “popularity” was accidental. It was originally created to do simple interaction with web pages, forms, etc. Then all of the sudden the web took off, and now javascript is the most popular language in the world (no kidding).
Considering where javascript started and what it could do back then, it’s amazing how much it can do today compared to other technologies that started off at the same time (hint, java applets).
Javascript is as powerful as you want it to be. It’s already getting pretty fast in modern browsers, and may be sufficient for some real-time games.
In the near future it will be THE language of choice for doing whatever projects you can think of. Everything will be running browsers, with a Javascript engine, televisions, your fridge, your shower, your toilet. Shunning away Javascript because you dislike some aspects you deem important in your own mind is so childish and will only result in you being so less competitive in the programming world in a few years.
This is how I see JavaScript developers… they hack away with JavaScript, eventually figure out how to do what they want, and in the end they can say, look, this is quite neat, it can do what I want! Just because a tool can get a job done doesn’t make it the best tool for the job, or even a good tool for any job.
Saying JavaScript is the future is such a joke. Embrace it or hurt your career? Ha! Give it a few years and the script kiddies will discover typed languages, think they are doing something new and magical, and start a movement which brings us full circle.
I’ve done a lot of JavaScript. I was doing “AJAX” with iframes in NS4/IE4 in 2001 before it was called AJAX. In 2004 I worked on a project that had 60k lines of JavaScript. It is a nice language for small projects. I wouldn’t choose it for medium sized projects. For large projects, it is an absolute mess. The same is probably true of any dynamically typed languages, even if they have some fancier features than JavaScript (eg, Ruby).
Problem is isn’t what I dream of having, it’s what I have and what I can do with it.
I’m programming IPTV portals, GUI’s, as a day job. Now we recently got this new fancy set-top-box and I’m creating a new portal with jQuery, HTML5, CSS and all that fancy smancy… what I’m saying here is that I don’t have the choice of NOT doing it like that. The set-top-box has a browser, Opera, it has a JS engine, a decent one, and in order for me to make those animations, to make a GUI that behaves and works well I have to use Javascript.
Javascript developer? There is no such thing. I write Javascript all day, and still I don’t consider myself as a javascript developer. I only see it as a means to an end, I’m a GUI guy, I design and make GUI’s work on the screen, I want the customer to have a seamless, fast experience, and my company to have the best looking interface out there. Javascript is just a tool to do that. If I don’t want to do any Javascript, I’d have to quit my job, and someone else would have to pay my bills.
Nobody is saying Javascript is the best tool for “the job”, whatever that job is. It’s the best available on the platform you have to work with. I didn’t hire myself to my job to write javascript code, I hired myself to get good looking GUIs out there to the customer. Anyone who has such a static view on their job, “code in language X, everything else is blasphemy”, I pity them.
And I’ve written in enough code, scripts, languages, to know that they come and go. Javascript is one of them, but from where I am sitting it’s future seems bright.
Hahahaha. JavaScript doesn’t even begin to address the needs of modern software developers. Concurrency anyone?
What a joke. JavaScript won’t ever be anything more than scripting for clueless developers who don’t know any better simply because it doesn’t solve any problem that needs solving.
If we can trust TIOBE index it’s still far from being most popular. Java and c is still top dogs. After tha comes C++, PHP, C#, Objective-C, (Visual) Basic, Python and Perl. After that there is JavaScript. Popularit seems to have stalled to under 2.5%. So what I am saying is that it’s not all about web browsers. There is ton of stuff where java script just isn’t the right tool(same aply to Java even if its almoust ten times more popular)
Have you ever tried developing a real application without OO? It gets ugly, quickly. As your codebase grows it becomes harder and harder to maintain. OO is a necessity, but it doesn’t exclude other options.
That’s the point: OPTIONS. JavaScript takes my options away and forces me to work in a very limited and stupid way.
Ok when your workload is like that but nothing I’ve worked on before has really fit that particular workload. I can see a lot of specific cases where it would be fine but… more cases that aren’t. And the client, of course.
Add proper threading APIs and support to JS and the argument would be moot of course.
If there’s anything we know for sure (if we can know anything for sure) is that the web is here to stay. Luckily for Javascript it is the language of choice for the web, besides html, and is the only scripting language available in all modern browsers.
What that tells us is that Javascript will remain very strong for the unforeseeable future, will be actively developed, supported, and browser software makers (Microsoft, Google, Firefox, Opera, etc.) will be working hard to optimize Javascript, and there’s still plenty room for that.
Multithreading? You already have that in Javascript, it’s called Web Workers, and is part of HTML5. http://dev.w3.org/html5/workers/
There are so many neat things in html5 that make web development very cool.
I believe Javascript is still in it’s infancy. It will be continued to be pushed to it’s limits as computer hardware becomes more and more powerful.
HTML5, CSS, Javascript, it’s really a rag-tag mix of technologies, but they seem to do the job. I’m not sure anyone would design things like this if they had to make the web again, but it’s here to stay.
I’d never use javascript for anything but the web.
Regarding the TIOBE rating:
[quote]The ratings are based on the number of skilled engineers world-wide, courses and third party vendors
[/quote]
The thing with javascript is that people with all sorts of skills are writing in it. When I said it was the most popular it means it is used by more people than the other ones, regardless of skill or area or expertise of those people.
Great, now JavaScript can reach where Java was in 1995. :
Multithreading alone is insuficient for modern software development. Controlling critical regions manually is inadequate because it is cumbersome and error prone. It makes as much sense as manual memory management.
I am working on a language that supports actors natively because of that.
JavaScript will stay around the same way Perl is still around. But it doesn’t make it good nor a viable option for real applications.
I felt kinda scammed when Sun dropped Self and switched to such a traditional language. But to be fair, it was easier to market than a Smalltalk derivative, and we got a pretty nice VM out of it (with JIT that came from the Self folks).
I ramble and digress, but is there really a topic to derail?