• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Learning Javascript

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #21
    Originally posted by fullyautomatix View Post
    Javascript is pretty powerful as a language but its limitation is that it runs on the browser.
    However, that limitation was removed in 1995: LiveWire Developers' Guide

    Comment


      #22
      Originally posted by d000hg View Post
      Perhaps re-read his post and you'll spot he never suggested any similarity except they were both crap.
      Which also proves his complete ignorance of both.

      Comment


        #23
        Originally posted by NickFitz View Post
        Which also proves his complete ignorance of both.
        I never said either were crap, just equally horrible. They're both scripting languages, and scripting languages are good for providing the glue between high level components created in proper programming languages. The problem is people have started to think these scripting languages can be used for proper programming, which whilst technically is true, doesn't mean that it's a good idea to do so.

        Python seems to be based on the premise that there are some people for whom brackets and semicolons are terrifying, and whilst I can kind of understand why some people might think like that, that doesn't mean it's a better language than all the C-syntax based alternatives. And like all these scripting languages, the real killer is the lack of static types. I've had to maintain bits of complicated Python, and I can't understand why anybody thinks it's a good idea to use a language where you can't work out what anything is. I suppose at least it has classes (Javascript's equivalent is ludicrous), but without static types you lose 90% of the benefit.

        Which brings us back to ECMAScript4 / ActionScript or whatever you want to call it, which had proper classes and static typing (like most of us have been doing for 20 years), as well as scripting style dynamic properties for when that's appropriate. And it was being produced by the official standards bodies ready to go into all the browsers and become a proper powerful modern object-oriented language for the web. But no, Apple and co (okay so it wasn't just Apple, but it seems appropriate to blame them) decided that it was too powerful and useful.

        And the double irony is that all the recent Javascript engine speed hype (I was reading something today about IE10's improved JS performance) largely centres on clever techniques to detect the use of classes and object oriented programming at runtime (because all the analysis shows this is how serious programmers work) and convert the dynamic types back to static ones. If they'd just built it into the language a) it'd work much better, and b) it would have saved a whole lot of effort.

        But as somebody who's written a JS interpreter, and integrated Microsoft's, Google's and QT's JS engines into not-a-browser applications, and done a load of JS programming for Flash, I'm probably just showing my ignorance. Sorry.
        Will work inside IR35. Or for food.

        Comment


          #24
          Originally posted by VectraMan View Post
          I never said either were crap, just equally horrible. They're both scripting languages, and scripting languages are good for providing the glue between high level components created in proper programming languages. The problem is people have started to think these scripting languages can be used for proper programming, which whilst technically is true, doesn't mean that it's a good idea to do so.
          There are arguments for both approaches. Back in the 1980s/90s I would use a scripting language for one-offs and prototyping. Once that occasional one-off became indispensable or a prototype was accepted, it was taken for granted that you would rewrite it in a proper language, for performance, robustness and ease of maintenance.

          However Increased hardware performance and an attitude that "good enough" will do has decreased emphasis on performance and robustness.

          PHP is another example here. Late last year I was seeing concerted attacks on Wordpress and I thought to myself
          • Do I need to run the risk?
          • Do I need the hassle of monitoring it and keeping it up to date, all for the sake of a blog where weeks can go by without me writing a single post?


          I found A plea for baked weblogs (which ironically took ages to load for me today), and New publishing system / tour of my head.

          One item in the second link appealed to me in particular: because you have the static HTML sitting on your laptop/desktop, you can index it and use your favourite search tools.

          The popular PHP based CMS products out there have limitations in their search engines and it's sometimes a real pain to find something you yourself have written via the inbuilt search tool. For example vBulletin won't search for anything less than 4 characters and I had to use a circuitous method to dig out my earlier link to a post on LUA.

          Originally posted by VectraMan View Post
          Python seems to be based on the premise that there are some people for whom brackets and semicolons are terrifying, and whilst I can kind of understand why some people might think like that, that doesn't mean it's a better language than all the C-syntax based alternatives.
          There's a very good reason for hating brackets, and that is non-English keyboards. My Swiss keyboards for example require various combinations of Alt, Alt Gr and Alt + Shift to get at curly or square brackets, the pipe symbol and so on (and of course with subtle differences between laptops and external keyboards, Apple and PC keyboards... I bought a US keyboard to get around that.
          Last edited by Sysman; 16 June 2012, 13:30.
          Behold the warranty -- the bold print giveth and the fine print taketh away.

          Comment


            #25
            Originally posted by VectraMan View Post
            I never said either were crap, just equally horrible. They're both scripting languages, and scripting languages are good for providing the glue between high level components created in proper programming languages. The problem is people have started to think these scripting languages can be used for proper programming, which whilst technically is true, doesn't mean that it's a good idea to do so.

            Python seems to be based on the premise that there are some people for whom brackets and semicolons are terrifying, and whilst I can kind of understand why some people might think like that, that doesn't mean it's a better language than all the C-syntax based alternatives. And like all these scripting languages, the real killer is the lack of static types. I've had to maintain bits of complicated Python, and I can't understand why anybody thinks it's a good idea to use a language where you can't work out what anything is. I suppose at least it has classes (Javascript's equivalent is ludicrous), but without static types you lose 90% of the benefit.

            Which brings us back to ECMAScript4 / ActionScript or whatever you want to call it, which had proper classes and static typing (like most of us have been doing for 20 years), as well as scripting style dynamic properties for when that's appropriate. And it was being produced by the official standards bodies ready to go into all the browsers and become a proper powerful modern object-oriented language for the web. But no, Apple and co (okay so it wasn't just Apple, but it seems appropriate to blame them) decided that it was too powerful and useful.

            And the double irony is that all the recent Javascript engine speed hype (I was reading something today about IE10's improved JS performance) largely centres on clever techniques to detect the use of classes and object oriented programming at runtime (because all the analysis shows this is how serious programmers work) and convert the dynamic types back to static ones. If they'd just built it into the language a) it'd work much better, and b) it would have saved a whole lot of effort.

            But as somebody who's written a JS interpreter, and integrated Microsoft's, Google's and QT's JS engines into not-a-browser applications, and done a load of JS programming for Flash, I'm probably just showing my ignorance. Sorry.
            Proper programming language I would suggest you delete that post it makes you look clueless.

            Comment


              #26
              Originally posted by NickFitz View Post
              Which also proves his complete ignorance of both.
              I don't know there is a metric which establishes how good/crap a language is objectively. For mainstream application development I think JS comes close though... it's just a mess where code errors are hard to find and dev tools are lame.
              Originally posted by MaryPoppins
              I'd still not breastfeed a nazi
              Originally posted by vetran
              Urine is quite nourishing

              Comment


                #27
                Originally posted by Sysman View Post
                There's a very good reason for hating brackets, and that is non-English keyboards. My Swiss keyboards for example require various combinations of Alt, Alt Gr and Alt + Shift to get at curly or square brackets, the pipe symbol and so on (and of course with subtle differences between laptops and external keyboards, Apple and PC keyboards... I bought a US keyboard to get around that.
                I have to admit in my (slightly drunken) rant the other night I hadn't considered the Swiss.
                Will work inside IR35. Or for food.

                Comment


                  #28
                  Originally posted by VectraMan View Post
                  I have to admit in my (slightly drunken) rant the other night I hadn't considered the Swiss.


                  It isn't just the Swiss. Almost every non-English keyboard I've come across suffers from this affliction.
                  Behold the warranty -- the bold print giveth and the fine print taketh away.

                  Comment


                    #29
                    scripting languages are good for providing the glue between high level components created in proper programming languages
                    Indeed. jscript runing within a .NET based browser is very powerful in my view, at least for the sort of educational interactives I am interested in. What you can't do in the jscript alone, just trigger the browser code. You can, for instance, move the mouse over a visible picture on a webpage while the .NET tracks it over a different one with hidden codes. If the jscript can't handle it, just call the .NET, save to a database, save a file, open another application, get proper print preview etc. Big advantage is that you can update a game with just a webpage, all the complex stuff is general purpose routines in the executable.
                    bloggoth

                    If everything isn't black and white, I say, 'Why the hell not?'
                    John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

                    Comment

                    Working...
                    X