On 05.02.2011 13:29, mcot wrote:
I don't see how JS is anything like C. C is a compiled systems
programming language with strict typing.
I didn't touch the _semantics_ (or some concrete ideological features,
e.g. static-vs-dynamic typing). I talked _in general_ about the _levels
of abstraction_ (exactly this I guess the initial post is about).
The thing is, if a new programmer is involved into our profession on
some _exact level of abstraction_, he has complete rights not even
_think_ about in abstractions of _previous level_.
For example, CoffeeScript. It's a new language. The fact that it's
compiled into JS is just a concrete case. With the same success it could
be written e.g. in C. Or even in Assembler. Does it mean that you should
learn Assembler first, before programming in Coffee? Of course not.
I.e. the programmer which attached into the programming on Coffee's
level of abstraction (and its syntactic rules and sugar) may learn
already only by docs of this level.
On the other hand, Coffee has in its core some of the semantics of JS,
so of course it would be not so bad to know JS itself. And on the third
hand (the third? 0_O )) -- it changes the semantics of JS in some parts.
E.g. you may not think in the prototypes, but think in classes, since
Coffee brings a syntactic sugar for that. In the same way -- in Python.
Python's classes are just a syntactic sugar for prototype-based
inheritance used in JS (from this viewpoint Python is also prototype-based).
If anything is "the next C"
I would say something like Google Go is the closest I have seen. I
think the author is trying to compare languages based on some
observations about popularity and significance to developers which
just seems so wrong and misguided.
I could see JS being on par with other dynamic scripting languages
(python/perl/ruby/php) if node/commonJS really take off. Despite its
excellent functional programming features I still find JS difficult to
program in and difficult to read mainly due to prototypical
inheritance and bizarre scoping rules. *In my opinion* constructing
larger programs is so much easier and more natural in python/ruby.
The most interesting thing is that JS is very-very similar to Python
(and Ruby is nearly here. And Lua. And CoffeeScript. And... maybe some
other langs).
Dmitry.
Perhaps the best use of JS is simply as a lightweight embedded
scripting language as we've seen in browsers. I know JS and its
variants are also used in scripting flash, PDF's and even some of the
Desktop in KDE.
On Feb 4, 11:40 am, "Dmitry A. Soshnikov"<[email protected]>
wrote:
Languages constantly evolve; new languages appear based on previous
levels of abstraction. As engineers we /control complexity/ - that's the
main purpose of programming. Solving a task we should have the ability
(techniques) to solve it in the /easy manner/. Until our current
languages are strong enough to beat the current level of complexity.
When we face with more complex language, we invent a new language. And
we should do this constantly. I.e. constantly envent new languages
depending on new needs and new complex task -- to solve these "issues"
easily.
So JavaScript may easily become the "next C". Or, it will just evolve to
new abstraction level (i.e. bringing new ideological abstractions and
very convenient syntax). And actually that exactly it does -- evolves.
TC-39 committee does a huge and great job by discussing new features.
ES6 aka Harmony will have some new convenient and useful stuff.
Unfortunately, because of backward compatibility, JS cannot evolve too
radically. It cannot just change the skin to e.g. CoffeeScript. The only
way of the radical changes in already existing language -- is to event
the new language. And that exactly what CoffeeScript is (author, Jeremy
Ashkenas did a great job).
Recently I brought a very valuable (in my opinion) quote from SICP on
the topic: "Why do we need new languages?"https://gist.github.com/809253
Dmitry.
On 04.02.2011 18:37, Acaz Souza Pereira wrote:
JavaScript is the next C
<http://jyro.blogspot.com/2011/02/javascript-is-next-c.html>
*http://jyro.blogspot.com/2011/02/javascript-is-next-c.html*
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]