Hi,
often I see people telling that "javascript sucks"
- is it because of the DOM with JS ?
- is it because of the language in itself ?
- is it because browsers/hosts differences ?
- is it because of language limitation ?
etc.
please don't turn this into a flame/troll war,
I just want to know what are the REAL reasons/arguments
behind that "javascript sucks" thing
I care only about technical argumentation, if you're just thinking
that js does sucks because you remotely heard someone saying that
but have no idea why well move away from this thread.
For my part I don't think JS sucks at all,
I'm just curious to know the reasons of that kind of assert
that's all :)
zwetan 16 2116
zwetan wrote: Hi, often I see people telling that "javascript sucks"
- is it because of the DOM with JS ? - is it because of the language in itself ? - is it because browsers/hosts differences ? - is it because of language limitation ? etc.
please don't turn this into a flame/troll war, I just want to know what are the REAL reasons/arguments behind that "javascript sucks" thing
I care only about technical argumentation, if you're just thinking that js does sucks because you remotely heard someone saying that but have no idea why well move away from this thread.
For my part I don't think JS sucks at all, I'm just curious to know the reasons of that kind of assert that's all :)
zwetan
Hi,
Mainly noobs write that.
They try something, it doesn't work as they expected, and start spitting out
subjects like that.
Just be patient and educate them.
Remember many people who start coding JS come from a designbackground, non
technical people.
And of course JS doesn't suck. :-)
Just my 2 cents..
Regards,
Erwin Moller
Javascript suck mainly because it's like a Scheme clone with Java
syntax tacked on and that is a horrible combination.
I may not say javascript sucks...but there are a few disadvantages to
it....I'm not a javascript programmer...but i try my stuff with
it...and to tell you the truth it's easy to have errors for weird
reasons...basically because u moved to a different browser.
It's totally client side and that's where the majority of the problems
come from. But all in all it's a good tool and a quick method for form
validations and quick lil effects. So it doesn't suck all
together...there are the pros and cons to it.
Regards,
Gerard.
Kris Cipa wrote: Javascript suck mainly because it's like a Scheme clone with Java syntax tacked on and that is a horrible combination.
It is a very good combination. JavaScript is the first lambda language
to go mainstream. http://www.crockford.com/javascript/javascript.html
Gerard <ca********@gmail.com> wrote: I may not say javascript sucks...but there are a few disadvantages to it....I'm not a javascript programmer...but i try my stuff with it...and to tell you the truth it's easy to have errors for weird reasons...basically because u moved to a different browser.
That's the fault of browser vendors (M$ and "Think Deranged" Apple),
not the language.
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
"Douglas Crockford" <no****@sbcglobal.net> wrote in message
news:nB*****************@newssvr11.news.prodigy.co m... Kris Cipa wrote: Javascript suck mainly because it's like a Scheme clone with Java syntax tacked on and that is a horrible combination.
It is a very good combination. JavaScript is the first lambda language to go mainstream.
I agree completely... but maybe "going mainstream" isn't the best argument.
Look at some of the crap that's gone mainstream:
Professional wrestling, Botox, disposable cell phones, Britany Spears,
Reality Television, Buying Stocks on Margin, Designer Clothing for Dogs,
Deeply spiritual Eastern religious symbols being tattooed on idiots because
"Dude, that looks wicked!", using the words "architect", "transition" and
"Impact" as verbs, etc.
JavaScript is great... but the mainstream often isn't. ;^)
Jim Davis
Jim Davis wrote: I agree completely... but maybe "going mainstream" isn't the best argument. Look at some of the crap that's gone mainstream:
Professional wrestling, Botox, disposable cell phones, Britany Spears, Reality Television, Buying Stocks on Margin, Designer Clothing for Dogs, Deeply spiritual Eastern religious symbols being tattooed on idiots because "Dude, that looks wicked!", using the words "architect", "transition" and "Impact" as verbs, etc.
JavaScript is great... but the mainstream often isn't. ;^)
Jim Davis
That's deep dude, let's architect a new language to transition to a new
era and better impact all the new programmers!
zwetan wrote: I just want to know what are the REAL reasons/arguments behind that "javascript sucks" thing
JS, as a language, doesn't suck, IMO. It certainly has its drawbacks, and
it's a simpler language than some programmers are used to, but it does the
job. I certainly would never pick it for server-side development, just as I
would never pick VB if given the choice.
I would say there are a number of arguments for the statement of "writing
javascript for a web-browser environment on the internet sucks", though.
For example,
1) There is no concept of "this will always work" like other languages. In
other languages, such as Java, if you're using JDK1.2, you know you'll have
certain things available to you, and you have very specific and detailed
documentation about how it will work. With javascript, you never know for
sure what will work and what won't, and there's no specific and detailed
information about it.
2) Debugging is a pain.
3) Javascript!=DOM, but for most people they are conjoined twins. And since
DOMs differ and specific documentation about them is hard to come by, the
conclusion is often that javascript sucks.
4) Unlike most other languages, it is hard to find good, solid examples of
javascript programming done right. Bad code is everywhere. And some of it is
really, really bad. For many other languages, you can find a good reference
that details how to do things correctly. Such references for javascript are
almost non-existant.
--
Matt Kruse http://www.JavascriptToolbox.com http://www.AjaxToolbox.com
After many years of C++ programming I encountered Javascript. Of
course it wouldn't do what I wanted it to and I had no idea how to
debug it so for a year I said "Javascript sucks". Now, thanks to this
group and daily exposure to it, I find it to be ah, delightfully
challenging.
I think you've pretty much nailed it, Matt. Also, I think the poster
who said it was a combination of Scheme and Java has it wrong. It is
only a Java-like syntax in the parts that Java has taken from C.
zwetan schrieb: Hi, often I see people telling that "javascript sucks"
Well, I think many people hate JS because of the common use of JS. There are too
many pages in the web filled with useless and buggy JS, mostly without any
advantage to the user but with lots of incompatibilities. So I think, most
people syaing something like "JS sucks" mean primarly "The common abuse of JS
sucks".
IMHO in many cases there's no real alternative to JS for some things (OK, you
can use Java-Applets too, but oftenly, these would be oversized). So on the
right place and the right use, it's a really good thing. But on some sites, it
can be really annoying too :o)
greetings,
martin
zwetan wrote: Hi, often I see people telling that "javascript sucks"
- is it because of the DOM with JS ? - is it because of the language in itself ? - is it because browsers/hosts differences ? - is it because of language limitation ? etc.
Given that any language , including javascript has it's strengths
and weaknesses, it would tend to be more a matter of human nature than
the shortcommings of javascript which yield these opinions.
Most anyoneone who has programmed before will as a matter of human
nature compare javscript to their language of choice.
They will immeadiately make note of all the features from their
language of choice that are missing in javascript.
Since their world is defined by the original feature set of the
other language(s) they've experianced they know nothing of the
features unique to javascript that are "missing" in their own language.
I can say without too much reservation that two of the items you
mentioned as sources of angst....
- is it because of the DOM with JS ?
- is it because browsers/hosts differences ?
... tend to underline my last point of coders not having experianced
the features in javascript, "missing" from other languages.
Object sniffing and Normalizaion is a feature of javascript
that I've really not seen in other languages I work with.
Heres an example that patches in the missing Array.pop() and
Array.shift() functions in IE5
function DCpop()//**Crutch IE5.0
{if(!this.length)return null;var result=this[(this.length-1)]
delete this[this.length];return result;
}
function DCshift()//**Crutch IE5.0
{if(!this.length)return null;var result=this[0]
for(x=0;x<this.length-1;x++)this[x]=this[x+1]
delete this[--this.length];return result;}
if(!Array().pop){Array.prototype.pop=DCpop;Array.p rototype.shift=DCshift}
With languge features like this , you can back fill support
to browsers a long ways , making those points about language
and DOM variations largley moot. Since this featue
was likely never in a language they knew, and never came into
play in their evaluation of the language.
As to the language limitations , I think most are referring
to low level I/O and buffer manipulation limitations.
Given the venue in which javascript plays , I think it
was wise to limit the languge in that fashion, but thats
not what folks are looking at. They want to solve problems
with the new language in te same way they did their old language.
At least today we have XMLHTTP, which given the big picture is
a good answer to the IO issue.
Will javascript be C+++ (my native) never I hope. HAs the language
stopped me from solving a problem? Never.
--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML, CSS,Javascript
--=<> Internet Programming since 1994 <>=-- DHTML NSAPI TCP/IP
--=<> http://resume.drclue.net <>=-- AJAX, SOAP, XML, HTTP
--=<> http://www.drclue.net <>=-- SERVLETS,TCP/IP, SQL
--.
zwetan wrote: Hi, often I see people telling that "javascript sucks"
- is it because of the DOM with JS ?
What is that supposed to mean?
- is it because of the language in itself ?
Unlikely.
- is it because browsers/hosts differences ?
That is a significant factor in encouraging people to dislike
javascript, though misplaced as differences in hosts are not the fault
of the language used to script those hosts, and javascript is the ideal
language for handling those differences.
- is it because of language limitation ?
Javascript doesn't have significant limitations as a programming
language. It relies on a host to provide an environment to be scripted,
and so if things like file IO are needed/relevant it is the
responsibility of the host to provide the facility.
etc.
please don't turn this into a flame/troll war, I just want to know what are the REAL reasons/arguments behind that "javascript sucks" thing
<snip>
You are asking the wrong people. Generally, the people who think
javascript sucks will be people who have expectations gained in the use
of other programming languages and have had a limited exposure to
javascript, insufficient for them to have gained an appreciation of what
javascript is capable of. So your should probably be asking people like
server-side Java developers, but that is not going to work very well on
Usenet because asking for criticism of javascript in a Java group will
be regarded as off topic, and so probably subject to complaints.
Richard.
In article <43***********************@news.wanadoo.fr>, zwetan
<ne********@zwetan.com> writes Hi, often I see people telling that "javascript sucks"
- is it because of the DOM with JS ? - is it because of the language in itself ? - is it because browsers/hosts differences ? - is it because of language limitation ? etc.
<snip>
Javascript didn't fit .NET at all well which is why Microsoft have spent
a fortune redesigning the language from the ground up. Presumably some
MS product strategist felt very strongly that 'javascript sucks'.
John
--
John Harris
Douglas Crockford wrote: Kris Cipa wrote: Javascript suck mainly because it's like a Scheme clone with Java syntax tacked on and that is a horrible combination.
It is a very good combination. JavaScript is the first lambda language to go mainstream.
http://www.crockford.com/javascript/javascript.html
Hi Douglas,
great article. :-)
I liked the part about encapsulation: and the javalike 'private'
constructions.
Regards,
Erwin Moller
thanks all for the comments
off course if I launched such discussion it's because I don't think JS
sucks,
but since about 10 years I see again and again the same "bad aura" around JS
programming
all the points that have been discussed here are valid, but imho one point
is missing
for me the main reason JS can have a "bad reputation" is because there is no
vendor behind JS promoting it
yes, there is Mozilla leading the implementation of the language,
but people from mozilla mainly push their browser platform, they do not
really
defend and/or educate people about JS in other platforms.
Since the language has been standardized to ECMAScript, it's like it has
been
left orphan, Mozilla take good care of its own JavaScript implementation,
some others
vendors implement also the standard but that's it, you don't have ONE entity
behind the language.
Behind Java you have Sun, behin C# you have Microsoft, etc.
and behind ECMAScript (the language, not the implementation) I feel like
there is no one,
except the developers community.
The problem is developers using the language everyday can see what's
missing,
what should be added, how the language could evolve, but they got no one to
talk with.
Because when ECMA add somethingto the standard (like E4X), they do not talk
to the developers, they talk to vendors implementing the standard, that's
put the
developer community out of the loop of the language improvments.
And even if the developers could be let out of the loop,
because after all E4X is still a great addon to ECMA-262,
the implementors have the choice to implement it or not,
so yes Bea, Mozilla, etc. will implement it, but they are a ton
of others who will not and this contribute to the fragmentation of the
standard,
there are not ONE vendor pushing/promoting the language to all implementors.
When you remember the way evolved JavaScript vs JScript,
when you look at the Opera or Safari implementation you can see history
repeating,
the ECMA-262 is here, still the same, but when it come to implementation
time
it's like anyone can do whatever he wants, add this feature but not that
one, or implement it later etc.
you as a developer you re too weak/small to tell Opera, Apple, or any other
implementor
that their implementation is buggy or miss important feature of the
language,
only a strong vendor could directly influence them.
Tomorrow ECMAScript v4 can be implemented anywhere and any implementor can
decide
that ECMA-262 is obsolete and you'll find yourself with another language
having nothing
close to the one you like and you will be able to do nothing, because there
is no main vendor
you can pressure/rant/yell at.
In this time where each big company use and overuse blog to be closer to
their community of developers,
you realize that the ECMAScript language is miles away from the developers
using it everyday.
Even if you don't give a sh!t about particular implementation of the
language (as Microsoft JScript, Macromedia ActionScript, etc.) and the only
thing that interest you is the Mozilla JavaScript implementation,
if the features you obtain in JavaScript are not implemented in the same
time on other platforms
you will not be able to use it globally (in ALL the browsers for exemple)
and so you find yourself
with a language which do not evolve as it should, and well you feel
frustrated at the language even
if it's not the fault of the language.
The worst thing being that new usefull features appearing in one platform
are not reinjected into the standard,
well... no vendor to enforce that sadely.
zwetan
On 24/09/2005 22:49, Dr Clue wrote:
[snip] Heres an example that patches in the missing Array.pop() and Array.shift() functions in IE5
If you're going to offer up replacements like that, they should either
follow the specification precisely or indicate where they differ.
function DCpop()//**Crutch IE5.0 {if(!this.length)return null;var result=this[(this.length-1)] delete this[this.length];return result; }
This doesn't reduce the size of the array, and it returns null when
there are zero elements, not undefined.
function DCshift()//**Crutch IE5.0 {if(!this.length)return null;var result=this[0] for(x=0;x<this.length-1;x++)this[x]=this[x+1] delete this[--this.length];return result;}
This also returns null instead of undefined when there are no elements,
and will create undefined properties in sparse arrays.
Neither could be applied to other objects
if('function' != typeof Array.prototype.pop) {
Array.prototype.pop = function() {
var n = this.length >>> 0,
r;
if(n) {
r = this[--n];
delete this[n];
}
this.length = n;
return r;
};
}
if('function' != typeof Array.prototype.shift) {
Array.prototype.shift = function() {
var n = this.length >>> 0,
i, j, r;
if(n) {
r = this[0];
for(i = 0, j = 1; j < n; ++i, ++j) {
if('undefined' == typeof this[j]) {delete this[i];}
else {this[i] = this[j];}
}
delete this[--n];
}
this.length = n;
return r;
};
}
if(!Array().pop){Array.prototype.pop=DCpop;Array.p rototype.shift=DCshift}
Testing the prototype object would seem a more appropriate approach. I
also don't see why you polluted the global namespace instead of
assigning the function objects directly.
[snip]
As to the language limitations , I think most are referring to low level I/O and buffer manipulation limitations.
Usually. Of course, they need to understand what a scripting language
is, and that the environment is responsible for providing features
(beyond the core), not the language.
Given the venue in which javascript plays , I think it was wise to limit the languge in that fashion, but thats not what folks are looking at.
Absolutely. Though ECMAScript is based around the scripting languages
implemented by Netscape and Microsoft, it is general purpose. Making I/O
and other features required will prevent that from being possible.
[snip]
At least today we have XMLHTTP, [...]
You /may/ have XMLHTTP. :P
[snip]
Mike
--
Michael Winter
Prefix subject with [News] before replying by e-mail. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: KK |
last post by:
Drop-down menus are the hottest thing since Wonder Bread but . . .
1. Alot of people put them in the
they-look-nice-but-you-cant-code-them-right-so-they-always-look-messed-up
category (a la...
|
by: Steven Daedelus |
last post by:
Hi folks,
I have a client using WebCalendar (http://www.k5n.us/webcalendar.php).
She has a link to her calendar in Outlook, which is what she uses to
fiddle around with it.
Now, I wasn't...
|
by: Richard Trahan |
last post by:
I want a js function to call a Perl script residing on a server.
The Perl script will return a string, to be used by the js.
Pseudo code:
<script>
stringvar = perlfunc_on_server(stringarg)...
|
by: Greg Swindle |
last post by:
Hello,
I have a question about how prototyping relates to variables and their
scope.
Given the following code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var ParentObject = function()
{...
|
by: Matt Kruse |
last post by:
http://www.JavascriptToolbox.com/bestpractices/
I started writing this up as a guide for some people who were looking for
general tips on how to do things the 'right way' with Javascript. Their...
|
by: COHENMARVIN |
last post by:
I am writing a javascript page. There is an error with the pagee, and
it does not work. Internet Explorer gives a message on the status bar
that there is a javascript error, but it doesn't tell...
|
by: Phlip |
last post by:
Javascripters:
I have an outer page and an inner iframe. The outer page calculates some
javascript, and wants the inner frame to run it. The inner frame should hit
a page on the same (private)...
|
by: mirkobonet |
last post by:
The idea is creating a contact form using mailto so it work with the
regular mail program.
(the server doesn't support php or asp)
I created the form and the function is function mailMe(form){...
|
by: perdeepOsingh |
last post by:
Hi,
What I am trying here is that from my first file I am making a call to handler.php file
//////////////////////////////FirstFile////////////////////////
<html>
<head>
<script...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
|
by: ezappsrUS |
last post by:
Hi,
I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
| |