Michael Evan Karpeles wrote:
> I am, however, suggesting that while JS is a
> multi-paradigm language, it seems to be very restrictive with respect to
> how these paradigms can be utilized.
It probably has the least restrictive implementation of objects.
It's functional paradigm strengths are pretty much in having lambdas and
closures.
Weaknesses in javascript
+ someone decided that overloading the + operator for concatenation was
a good idea.
+ != works as a logical xor, while the bitwise xor only for numbers (see
!== for logical !=)
+ blocks don't add to the scope chain.
+ The global variables thing isn't very much a pain in the ass as
compared to other languages, it just requires the person programming to
understand the big picture. There is no distinction really between
function variables and global variables. You have the global context. A
function just creates a new context that chains to the function below it
(or the global context if none).
>
> Ok. I see the PROS and CONS of Javascript and I'm sure Nick and Jake can
> find both inaccuracies in my findings, as well as ways to combat some of
> these issues... I hope they do because I'd like to know more about JS...
> But!
>
> The real argument here (of the paper) was scalability. Currently,
> different implementations of JS can be pretty darn fast; Granted. But
> the language does not lend itself well to real concurrency. If you try
> really hard, you can simulate pseudo threading by using setTimeout. In
> this respect, you can perform multiple function executions in what would
> seem to be a simultaneous fashion (even though you will not get the
> benefits of true threading by doing so). JavaScript is a good language
> but at this point I don't see it being a hugely popular, scalable
> language outside the realm of browsers.
Yes, javascript lacks multi-threading in pretty much all of the
incantations of it I've heard of... which is actually a bit odd to me
considering its use of event interfaces and the entire AJAX thing.
Otherwise, I'd say that Javascript is a hell of a lot more scalable than
any other procedural language.
>
> Sincerely,
> - Michael E. Karpeles
>
|