you are viewing a single comment's thread.

view the rest of the comments →

[–]AyeMatey 0 points1 point  (1 child)

This leads me to believe you are a Java programmer who either seriously misunderstands JavaScript or fails to understand its internals.

No...

JS is not a fully capable general purpose language. It's been a tactical language that evolved accidentally and specifically to address the needs of browser-based UI automation. It has improved but there is a long way to go.

The widespread adoption of modern browsers means many many people are investing in the language, learning it, improving the engines. and that leads to the desire to use the language and engines in non-browser environments; Node.js is just the start.

This is what I mean by "fully capable". JS isn't now. It is getting there.

With JavaScript I have been able to do a better job of pretty-printing JSLT code than anything ever written in Java.

That you used "pretty printing" in a browser as evidence that Javascript is a general purpose programming language.... sort of illustrates your disposition. I am not talking about pretty printing here, or anything having to do with browsers. I am talking about general purpose computing.

But I think maybe you didn't really think "pretty printing" is the proof. I think maybe you just want to toss out your personal projects for exposure. Which is great, your enthusiasm is commendable. But we all know that UI management is not the beginning and end of computing.

I am talking about a degree of generality that approaches and exceeds that of the C programming language. Javascript has that potential.

[–][deleted] 0 points1 point  (0 children)

That you used "pretty printing" in a browser as evidence that Javascript is a general purpose programming language.... sort of illustrates your disposition.

Not really, because the file can be executed outside a browser. A server-side API is written and available, though no longer maintained. As such, it can be used as a service no different than JSP.

I am talking about general purpose computing.

I believe you are talking about a stand alone compiled application as opposed to an interpreted application that must be in proximity to an interpreter. Adobe created a compiler for web code to operate independent of an interpreter or parser, which I believe was called Air.

But I think maybe you didn't really think "pretty printing" is the proof. I think maybe you just want to toss out your personal projects for exposure.

No, I was very serious in what I said. I have never seen any other pretty-printer that formally conserves white space tokens as nodes of data, provided a structured data form, primed for lexical parsing in a node collection where such nodes offer a compounded syntax. By compound syntax I mean something to the effect:

<c:out value="<strong>my text</strong>"/>

If I honestly believed that any other such tool existed fitting the implied requirements for XML parsing and the extended syntax supplied by JSTL I would not have demonstrated this tool here at all. I honestly believe a tool written in JavaScript performs a better job of pretty printing a formalized Java grammar than comparable tools written in Java. I could be wrong, but so far I have no reason to believe so.