Choose a new carreer :)
> The claim that Javascript "become[s] quickly unreadable for even
> medium-sized applications" really reflects only on the individual
> programmer/developer and not on the language, honestly. Javascript
> does not deserve to be compared to (e.g.) php, an unruly beast that
> literally encourages a mess. Javascript is, at worst, neutral with
> respect to organization; at best it embodies the heights of
> abstraction, encapsulation, and readability. It's all up to you.
A problem with javascript is that most people using it never get beyond
writing tiny bits of code to perform a single effect on a page. With new
frameworks making that even simpler that is even more true now than it
was a few years ago. But once you get beyond that you will indeed see
that javascript is a very nice and fun language.
Wichert.
--
Wichert Akkerman <wic...@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
Unfortunately in the world of browsers you can not use something until
enough browsers support it. That is why we are still bound by the
capabilities of IE6 even now.
>> The claim that Javascript "become[s] quickly unreadable for even
>> medium-sized applications" really reflects only on the individual
>> programmer/developer and not on the language, honestly. Javascript
>> does not deserve to be compared to (e.g.) php, an unruly beast that
>> literally encourages a mess. Javascript is, at worst, neutral with
>> respect to organization; at best it embodies the heights of
>> abstraction, encapsulation, and readability. It's all up to you.
>
> A problem with javascript is that most people using it never get beyond
> writing tiny bits of code to perform a single effect on a page. With new
> frameworks making that even simpler that is even more true now than it
> was a few years ago. But once you get beyond that you will indeed see
> that javascript is a very nice and fun language.
>
I actually disagree there, javascript (IE the spec and all non-browser
interpreters) is a very nice language, just as nice as python and
sometimes a bit better with some of it's tricks. But the problem is
when it comes to implementations all those libraries are there because
it's totally horrible to get all the tiny details fixed. The other big
problem with JS is that it's bound to the browser therefore the dom
therefore you have to have wrappers around everything to make it work.
So basically most people are afraid of it, rather than amused.
That said I really think a JS wrapper in JS is better than a JS
wrapper in python or whatever language for that matter. Any DSL which
is pretty much what all the libraries have become is way better than
having a half baked parser/compiler/runtime to generate code from
language A into language B
I strongly agree. This is one huge case of leaky abstractions in my opinion.
By the way, John Resig (jQuery's author) has a take on this:
<http://ejohn.org/blog/javascript-language-abstractions/>
--
Lawrence, www.neropercaso.it - oluyede.org
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair
2008/12/6 Lawrence Oluyede <l.ol...@gmail.com>:
>
> On Sat, Dec 6, 2008 at 2:36 PM, Jorge Vargas <jorge....@gmail.com> wrote:
>> That said I really think a JS wrapper in JS is better than a JS
>> wrapper in python or whatever language for that matter. Any DSL which
>> is pretty much what all the libraries have become is way better than
>> having a half baked parser/compiler/runtime to generate code from
>> language A into language B
>
> I strongly agree. This is one huge case of leaky abstractions in my opinion.
> By the way, John Resig (jQuery's author) has a take on this:
> <http://ejohn.org/blog/javascript-language-abstractions/>
Thanks for that interesting link, it was a read which triggered some thoughts.
I've seen the latest pyjamas announcement on freshmeat, looked at it
and thought: Oh, this looks nice, maybe give it a try.
Up to now, I haven't come around to do so, but I definitely will at
least take a bit of time and look what it can to and can't.
The thing which really triggered my thoughts was a statement in one of
the comments:
"How would an Assembler or C developer have looked at code generators
10 - 20 years ago?"
And that is a comparison that feels somehow fitting. Yes, of course
are solutions you write in ASM or C 10-20 times faster than anything
written in an interpreted language. Yes, they are smaller and more
elegant. But why are the demands of the market for ASM or C developers
decreasing now, and if you look at job adverts, most jobs are for a
higher level language...
Because it is just a lot more productive writing code in Python or
Ruby or even Java, than doing it in plain C or even Assembler. Yes,
with some good libraries, you can speed up the development process in
C quite a bit, but it still isn't as fast as going with a language
like Python in the first place (at least that is what my experience
suggests).
Still, there are things which are absolutely viable to implement in C,
and either use them as a library, or just glue them together in a
higher language....
And if you translate that onto a JS code generator, I think that that
might be a route we possibly will see: Prototype and develop your
stuff in one of the higher level abstraction tools (like GWT or
pyjamas), and only handtune or handwrite the real critial stuff in
direct JS.
It might work *shrug*
But, as I said, I haven't yet really played around with any of those
toolkits, but I definitely want to give it a try :)
Jens
This make really sense but applied from a lower level language to a
higher level one. You don't write a Haskell code generator in Erlang
because you feel more comfortable using the Erlang toolset and VM. You
write in Haskell because you need/like Haskell. Despite some people
think
JavaScript is not a bad language, is the world around it that is not
as good as we'd like it to be.
But JavaScript is the heart of the scripting of many browsers and it's
a dynamic language at the same level as Python, Ruby or whatever. I
think that the best way to learn and develop in JavaScript is to learn
it, master it, read about it, experiment with it, get a library for it
and so on. You notice how many times I used *it* and not "something
else" :D ?
Pyjamas (and GWT) is a fine idea but in my opinion has been conceived
for the wrong reasons.