• 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!

Xsl

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

    #41
    If its not procedural, why there is IF statement in it? Why there are LOOPs? Why there are VARIABLES? There is branching in place, but its so primitive its like they were having a laugh. Okay, its not procedural, then exclude all variables, loops, swithes, IFs. Oh wait - but if they did it, then nobody would use it, ffs, at least they should have stayed consistent.

    IMO they just made their work easy by not including things like ELSE, variable assignment etc. That's fireable offence - they should make easy life of people who will use THEIR product.

    Comment


      #42
      Originally posted by _V_
      You really don't understand computer science do you?
      I solve practical real life problems. As for loops they are present in form of "for-each". Not actually sure its breakable, and there appears to be no goto

      It sucks because I had high hopes for XSL - we DO need language that deals with sets nicely by light querying XML with Xpath, unfortunately it seems to be rather castrated version of what it could have become.

      Where are Haskell or Scheme now? Nobody uses them, designers of XSLT should have asked themself simple question why and instead of boosting their ego they should have created something that is useful in real world for real world programmers.

      Comment


        #43
        Okay I'm getting bored now.

        I ask of you one final thing. READ the text below, then lookup functional programming, study recursion, delete the crap you have written in XSLT so far and start again.

        XSLT is Turing complete. This means that given sufficient memory, XSLT can calculate anything any other Turing-complete language (such as C++) can calculate. This comes as a bit of a surprise to programmers who are accustomed to more traditional languages. After all, XSLT is missing some features that are important to a lot of algorithms, including loops and mutable variables.

        Note: What XSLT calls variables are called constants in most other languages. They're more like algebraic variables than traditional programming variables.

        Functional programming

        The omissions just mentioned aren't oversights. XSLT is a functional language rather than a procedural one. In a procedural language such as C or Pascal, a program is defined as a sequence of steps, the execution of which in the specified order produces the final result as the last step in the sequence. In a functional language, a program is defined as a function composed of other functions, the evaluation of which leads to the final result. The big advantage of functional languages is that the order of execution doesn't matter.

        The functional nature of a language makes it more amenable to parallel processing because multiple parts of a program can be evaluated simultaneously with no concern for which parts need to be evaluated before other parts. Thread safety is automatic.

        Functional languages, including XSLT, can't include traditional loops because loops are ordered in time. That is, a typical loop is written and compiled such that i==1 has to happen before i==2. Of course, you can run loops backward instead of forward, or increment the loop counter by something other than 1, or even eliminate the loop counter completely as you do in a while statement. However, regardless of the loop's type, the order of execution matters, and this is antithetical to functional programming.

        Now stop whining, learn something radical that isn't VB or C and move along.
        First Law of Contracting: Only the strong survive

        Comment


          #44
          Originally posted by AtW
          Whoever designed XSL should be stoned (not by smoking hash).
          XSL is easy if you know how to program.

          If you only know Basic and similar languages like C++, Java then you'll be buggered.

          My favourite from a newbie to XSL was: "How do you break out of a loop?"

          I feel there should be a minimum standard before people can call themselves programmers.
          Insanity: repeating the same actions, but expecting different results.
          threadeds website, and here's my blog.

          Comment


            #45
            At last, sense.
            First Law of Contracting: Only the strong survive

            Comment


              #46
              LOL, thread safety and performance are touted as reason for lack of completely essential elements in real world programming. If it is so bloody functional, then why they included FOR-EACH loop? Why did they include IF statement? Why did they actually include variables, but they act as constants? What kind of BS is that they say its so bloody parallel, but recommend using recursion, ffs, this is performance killer and no one in sane mind would use XSL for anything that requires high performance.

              Talking of performance - reports all around the Net suggest that performance sucks big time, how come?

              What a waste of opportunity XSLT is.

              Comment


                #47
                It's horses for courses; you wouldn't write a web page in assembler would you?
                Insanity: repeating the same actions, but expecting different results.
                threadeds website, and here's my blog.

                Comment


                  #48
                  My friend, XSLT is a functional language and hence it cannot have the features of a procedural language. It is impossible. It ceases to be what it was designed to be.

                  If you don't understand what this means, you had better quit XSLT now and parse the XML in C# or Java, iterate through the DOM and build your output using all those lovely variables, string concatenation, if-else and loops you understand so well.
                  Last edited by _V_; 30 August 2006, 18:25.
                  First Law of Contracting: Only the strong survive

                  Comment


                    #49
                    Originally posted by threaded
                    It's horses for courses; you wouldn't write a web page in assembler would you?
                    I wouldn't be surprised if he said HTML is appalling for it's lack of loops and variables and that assembler should be used instead.
                    First Law of Contracting: Only the strong survive

                    Comment


                      #50
                      Originally posted by _V_
                      XSLT is a functional programming language like Haskell or Scheme
                      Where are Haskell or Scheme now? This "functional" buzzword means nothing to me if the language (functional or not) does not support obvious things that should be supported: this reminds me Pascal - a lot of features of it were completely noobifed to make life of the compiler writer much easier, ffs, its the life of end users (ie me) that should be made easier, not the guy who can't be arsed to add break/continue functionality to the loop.

                      If variable can't be change then its not a variable, because it does not vary. Bastards

                      Comment

                      Working...
                      X