[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Languages that generate JS and interoperability with JS frameworks

Haddock

12/19/2014 4:44:00 PM

Hello,

I'm a Java developer and a bit tired of Java. So I feel like learning a new language. There are several languages that generate JavaScript like Dart, Scala, Kotlin and others. So, those languages would be candidates for me to look into.

Now my understanding of JavaScript is limited and I need to ask the experts here. What makes me wonder is how easy it is to interface with JS libraries such as jQuery or AngularJS from those languages that generate JavaScript.. There must be some mechanishm that you can bypass the language generating JS and reach through to the respective JS library. My question is how practical that is. Anybody tried this? Would be thankful for sime insights :-).

Regards, H.
3 Answers

Evertjan.

12/19/2014 6:25:00 PM

0

Haddock <ffm2002@web.de> wrote on 19 dec 2014 in comp.lang.javascript:

> Hello,
>
> I'm a Java developer and a bit tired of Java. So I feel like learning a
> new language. There are several languages that generate JavaScript like
> Dart, Scala, Kotlin and others. So, those languages would be candidates
> for me to look into.

Wrong Q.

If you want to learn French or Swahili, you don't want to know primarily
about Google translate, you start with a mixture of grammar and hands-on
experience.

If you want to learn Javascript, learn to generate it from your own mind,
and look how others have coped with simple tasks. The web is full of bad and
good examples. Don't buy a "bible" all Javascript books are bad and
outdated, but primarily you will erroneously believe what is written there
in.

Ask yourself what you are going to use Javascript for, clientside in
browser, serverside, in cscript/jscript or in special engines,
all have different flavors and have fastly different interfacing with the
outside world.

> Now my understanding of JavaScript is limited and I need to ask the
> experts here.

No, you don't *need* to ask silly Qs.

> What makes me wonder is how easy it is to interface with
> JS libraries such as jQuery or AngularJS

Even experts think that is the way Javascript should be used,
forget about jQery until you are an expart yourself and you are convinced
you don't need such crap.

> from those languages that
> generate JavaScript. There must be some mechanishm that you can bypass
> the language generating JS and reach through to the respective JS
> library.

Why must there be, and if there is, why is that usefull?

> My question is how practical that is. Anybody tried this? Would
> be thankful for sime insights :-).

Above are sime.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Thomas 'PointedEars' Lahn

12/19/2014 6:42:00 PM

0

Haddock wrote:
^^^^^^^
This is Usenet. Please fix.

> I'm a Java developer and a bit tired of Java. So I feel like learning a
> new language. There are several languages that generate JavaScript like
> Dart, Scala, Kotlin and others. So, those languages would be candidates
> for me to look into.

I do not understand your reasoning. You are tired of Java but would prefer
Java-like languages over others? Languages like Scala have been designed to
make it easy for programmers of Java because they *want* to write Java code,
no matter the resulting language.

Different from Java, JavaScript is not one programming language. There are
several implementations of ECMAScript, differing in features and syntax
extensions, that contain the â??JavaScriptâ? name. There are others that have
a different name but sometimes are subsumed, equally misguided, under the
â??JavaScriptâ? name (often using invented terminology such as â??Javascriptâ? and
â??javascriptâ?). Beware the wannabe.

<http://PointedEars.de/es-...

> [â?¦] What makes me wonder is how easy it is to interface with JS
> libraries such as jQuery or AngularJS from those languages that generate
> JavaScript.

If the wrapper/generator language is any good, there is no significant
difference, of course. It is never the generating code that â??interfacesâ?
with them, but the generated one. Whether you should write code that
interfaces with them, especially as a beginner, is another issue, though.

> There must be some mechanishm that you can bypass the language
> generating JS and reach through to the respective JS library.

Your assumption is unfounded. This library and _framework_, respectively,
are not separate programming languages, and they would not run with code
other than one that conforms to the grammar of ECMAScript (Editions 3 and
above), without syntax extensions. If you want to bypass a generating
language, do not use it; your code will likely be better for that.

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not cc me. / Bitte keine Kopien per E-Mail.

Sister Ray

12/23/2014 5:15:00 PM

0

Have a look at this: http://www.typescrip...