hence why I am assuming that if people hated it so much, they would have made another client-side language
hence why I am assuming that if people hated it so much, they would have made another client-side language
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
Javascript, IMO, is fantastic.
Javascript in the browser (and, admittedly, that's the main place you find it) has this terrible problem called "the DOM". I really like the language itself: it's powerful, straightforward, and I actually prefer its inheritance model over PHP's. As you point out, Daniel, it has serious shortcomings in implementations, as a result of different companies writing their own engines and adding their own features. There are also some dumb things in the language itself, left over from the very beginning, that never got fixed. But I like it.
Hm. The organization of the language? I suppose it's fine.
The two things that bother me most above Javascript are:
1. Using it for anything (=DOM). (I mean, what else is there, in a practical sense?)
2. The inconsistencies both across browsers and a lack of strict syntax requirements. I find it idiotic that JS allows a final comma in arrays-- that's just a terrible way to encourage bad code; likewise, the lack of semi-colons at the end of lines.
If another language were modeled after JS using the same organization, I suppose it could be fine.
It doesn't work like that. You can't just make one. Take a look at Microsoft Silverlight for example. It's meant to do the same things Flash does. And it does do them. It might even be better (I have no idea!), but it's basically useless because no one has it. Only people who use Netflix, as far as I know, ever bother to install Silverlight. And even Flash (which is very widely supported but not everywhere) has limitations because it's not part of the browser.Originally Posted by bernie
Javascript is part of the browser. If you want to see how this works, then just look at HTML/CSS/JS as they get updated-- XHTML and IE, or proprietary CSS, or Google Chrome trying to allow users to drag images onto upload boxes from their desktops. All of that works (at least for a time) only in certain browsers (and then there's the awful backwards compatibility problem), and the result is that creating a whole new language and getting it out there would extremely difficult. Perhaps if the next version of Google Chrome (or IE or FF, or whatever) comes with a new language, then in the next 5-10 versions of all browsers it would become supported. But JS, despite its problems, works, so no one has bothered because that's simply too hard. In the real world, that would also cause more problems, not fewer, because there would not only be many versions of JS, but now there would be many versions of JS and some new programming language (perhaps with other versions out there too).
In contrast, all that a serverside language needs is one individual who wants to install it and use it on a server and then it's immediately compatible with all visitors.
A clientside language needs updates on every user's computer, some sort of movement to make that happen, and probably an insider at one of the major browsers to get things started.
So most people just deal with JS and don't try to change it.
Of course the other option is to fix Javascript, but that has many of the same problems and would, by fixing things, cause backwards compatibility issues.
Traq, I guess you can consider jQuery to be a DOM solution then? It also has other things like Ajax, though. To me, needing to use a library like that (it's very popular, or at least some library for each person), seems to defeat the point. Although there are some extensions/libraries for PHP, it works fine without them and most people don't use/need extras.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
yes, absolutely, and it's very good at that. And jQuery is written in ...javascript!
I don't think it defeats the point - every developed programming language has code libraries, application frameworks, extensions, and so forth. It's code reuse. PHP has the PEAR library, Zend framework, all sorts of other ones - as you say, many people never touch them, but I think that's more a result of most people never creating really complicated apps.
That's exactly what I am saying Daniel, Say if google and Mozilla decide that they've had enough of JavaScript and go off making some obscure language, supporting it in their browsers and then picking it to opera and Internet explorer, and bam, you've got a new JavaScript, however, that isn't going to happen, because they like JavaScript, (as I mentioned earlier), and you shouldnt fix something that aint broke.
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
traq, hm, I guess that's true.
But something like PEAR is just an extension of functions for specific tasks.
jQuery actually takes over JS for most things.
Zend isn't very popular as far as I know-- it's out there and used, but not at all in the same way as jQuery. Right?
Sure, if in some crazy alternate reality all of the browsers decide to cooperateOriginally Posted by bernie
Look at VML, supported only in IE. It just doesn't work like that. They're trying to compete (which makes it harder on the end users in this case).
It's more like "if it ain't really totally unusable, don't bother fixing it".
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
I going to have to use that quote
Very true, but if you look at javascriot as a case study, Internet explorer was running around with vbscript, Netscape had JavaScript, and look where it took us, now JavaScript is the most ( and really only) wide supported client-side language.
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
Maybe I'm not aware of the details here, but I thought vbscript became Javascript. So it's like merging ASP and PHP into one new thing. Javascript wasn't the first version anyway-- there were a few versions out there that all collapsed into one. Now we can write it all in "javascript" and it works across browsers, but in some sense we're still writing all of the different languages that happen now to be identical.
Is that classification wrong?
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
A far as I know, vbscript disappeared into the nether, with limited use ( although you can ask keyboard1333 about his rather interesting use of it, in accidentally deleting some of my code ), but it is quite true that JavaScript is not the first iteration of the language, after a quick search, it turns out that it started out as livescript, went to JavaScript, and then was submitted to ECMA international and became standardized.
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
Hm, looks like I was wrong about that. VBScript is still part of IE, and it is used more generally on Windows OS as well as the basis for ASP scripting. So it's just something totally separate and has been effectively replaced by Javascript (but not merged in any sense) within browsers, including IE.
The exception, I think, is ASP applications that involve client-side components, which is why some websites are IE-only-- they use VBScript and ASP to create the full experience.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks