Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Javascript is hard to appreciate...

  1. #11
    Join Date
    Nov 2005
    Location
    Scandinavia
    Beans
    939

    Re: Javascript is hard to appreciate...

    If people wonder why i'm so picky about the language and it's features, then it's because i'm looking at rewriting an application (written in pyhton and pyqt) of mine in pure javascript and html5. Mainly for fun, but it also seems javascript and html5 is where the future is taking us, so i may just as well learn it right now.
    If it was just a little DOM manipulation in some web page we were talking about, i might not be so hesitant, but when writing anything over 100 LOC, i want to know the language better.

    Quote Originally Posted by juancarlospaco View Post
    Then this is for you, JS more Python-like
    Hmmm. Interesting! Initially, i was looking at javascript compilers such as pyjamas, but apparently you can't use 3rd party js libraries like jquery then.
    I prefer using the "real thing" if possible. We shall see what people have to say about coffescript.

    Seriously though, it would be nice if all browsers had a VM instead, so that people could just drop in compiled byte code for languages that supported this VM, instead of supporting just this one language (javascript).
    - "though It seems that I know that I know, what I would like to see Is the I that sees me, when I know that I know that I know" / Alan Watts

  2. #12
    Join Date
    Mar 2009
    Location
    Buenos Aires, AR
    Beans
    2,325
    Distro
    Ubuntu

    Re: Javascript is hard to appreciate...

    Such thing exist, google for HTML5 Native Client, anyways no Python bindings (yet?)

    You can write the app on Python, and use HTML5 for the GUI, i use that.

  3. #13
    Join Date
    Apr 2009
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Javascript is hard to appreciate...

    Server side, you can code in just about any language you like...client side...well, N1GHTS already told us everything we need to know. If that Native Client will be anything like Java VM, no thanks. That has left me a bad taste about VMs in general. A personal issue here.

  4. #14
    Join Date
    Nov 2005
    Location
    Scandinavia
    Beans
    939

    Re: Javascript is hard to appreciate...

    Quote Originally Posted by juancarlospaco View Post
    You can write the app on Python, and use HTML5 for the GUI, i use that.
    Hmm! Again, interesting. How do you achive that? I've looked into using PyQt4 and a webkit view for the GUI, manipulating the DOM via python. Also, i noticed pywebkitgtk is aiming to supply a webkit view with python support for client side scripting.

    In the end though, i'll probably go with javascript, but it's nice to see alternatives forming on the horizon!
    - "though It seems that I know that I know, what I would like to see Is the I that sees me, when I know that I know that I know" / Alan Watts

  5. #15
    Join Date
    Aug 2006
    Location
    60°27'48"N 24°48'18"E
    Beans
    3,458

    Re: Javascript is hard to appreciate...

    Crockford's "Javascript: The Best Parts" is also mandatory reading for those who want to understand what is good in the language and how to make use of that to avoid what is bad.

    Javascript has some remarkably awful design decisions in it (just think of the scoping of "this"); fortunately, those can be offset by the really fortunate things such as functions as first class values, closures, the fairly flexible and simple object model and, yes, the prototypal inheritance once grasped for what it is.

    The ability to use Javascript much, much better in a conceptual sense by understanding for example the relationship between functional and object-oriented programming is one of the reasons why, mind you, I've always been a big proponent of higher-level languages ... they teach you useful ideas you wouldn't get from lower-level languages.
    LambdaGrok. | #ubuntu-programming on FreeNode

  6. #16
    Join Date
    Apr 2007
    Location
    (X,Y,Z) = (0,0,0)
    Beans
    3,715

    Re: Javascript is hard to appreciate...

    Quote Originally Posted by Paddy Landau View Post
    You betray your youth

    There is no such thing as a "classical" OO language. OO programming is the new kid on the block.

    Javascript began before OO was as popular as it is now.
    Sure. OOP existed since we had data structures to which we semantically associate some behaivor... And we've been doing this since Lisp or any programming language that supports some aggregate-type mechanism... In C, that'd be struct... In Lisp, regular cons'ing... In C++, class, etc. What may be new is syntactic support for these things, but that's completely irrelevant.

    About the topic:

    I'm not very Javascript savvy, but IIRC, Javascript earns its bad reputation from the fact that it was overused and badly used by people with no programming experience in something as critical as web pages. It's critical because web browsing is possibly the most important usage of computers nowadays and people need sites that work... and those newbies' pages tended to not work.

    But the language does have a couple of interesting features people have learned about... For example, the fact that you can use Javascript outside the browser or its functional programming features.
    Last edited by nvteighen; September 20th, 2011 at 05:31 PM.

  7. #17
    Join Date
    Mar 2009
    Location
    Buenos Aires, AR
    Beans
    2,325
    Distro
    Ubuntu

    Smile Re: Javascript is hard to appreciate...

    Quote Originally Posted by pelle.k View Post
    Hmm! Again, interesting. How do you achive that? I've looked into using PyQt4 and a webkit view for the GUI, manipulating the DOM via python. Also, i noticed pywebkitgtk is aiming to supply a webkit view with python support for client side scripting.

    In the end though, i'll probably go with javascript, but it's nice to see alternatives forming on the horizon!
    I use http://bottlepy.org and HTML5, HTML5 itself got Off-Line feature,
    if i need to include an additional/optional window to display the app i use
    http://code.google.com/p/devicenzo/

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •