今天继续试验十分钟可以干什么,选取了wiki上对Functional Programming的定义,看看十分钟可以读多少(在能够理解内容的前提下),因为这篇wiki前半部分都是介绍性的,没有太多复杂的逻辑需要理解,因此读起来比较顺利,结果如下:
1、打开浏览器,从google搜索关键字,并打开wiki网页,用时30秒。
2、阅读简介部分,用时5分钟
In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state.[1] Functional programming has its roots in the lambda calculus, a formal system developed in the 1930s to investigate function definition, function application, and recursion. Many functional programming languages can be viewed as elaborations on the lambda calculus.[1]
In practice, the difference between a mathematical function and the notion of a "function" used in imperative programming is that imperative functions can have side effects, changing the value of already calculated computations. Because of this they lack referential transparency, i.e. the same language expression can result in different values at different times depending on the state of the executing program. Conversely, in functional code, the output value of a function depends only on the arguments that are input to the function, so calling a function f twice with the same value for an argument x will produce the same result f(x) both times. Eliminating side-effects can make it much easier to understand and predict the behavior of a program, which is one of the key motivations for the development of functional programming.[1]
至此,总用时三分钟。
Functional programming languages, especially purely functional ones, have largely been emphasized in academia rather than in commercial software development. However, prominent functional programming languages such as Scheme,[2][3][4][5] Erlang,[6][7][8] OCaml,[9][10], and Haskell,[11][12] have been used in industrial and commercial applications by a wide variety of organizations. Functional programming also finds use in industry through domain-specific programming languages like R (statistics),[13][14] Mathematica (symbolic math),[15] J and K (financial analysis)[citation needed], and XSLT (XML).[16][17] Widespread declarative domain specific languages like SQL and Lex/Yacc, use some elements of functional programming, especially in eschewing mutable values.[18] Spreadsheets can also be viewed as functional programming languages.[19].
Programming in a functional style can also be accomplished in languages that aren't specifically designed for functional programming. For example, the imperative Perl programming language has been the subject of a book describing how to apply functional programming concepts.[20] Javascript, one of the most widely employed languages today, incorporates functional programming capabilities[21].
至此,总用时五分三十秒。
2、然后阅读History部分,用时5分钟,只读了一部分
Lambda calculus provides a theoretical framework for describing functions and their evaluation. Although it is a mathematical abstraction rather than a programming language, it forms the basis of almost all functional programming languages today. An equivalent theoretical formulation, combinatory logic, is commonly perceived as more abstract than lambda calculus and preceded it in invention. It is used in some esoteric languages including Unlambda. Combinatory logic and lambda calculus were both originally developed to achieve a clearer approach to the foundations of mathematics.[22]
An early functional-flavored language was LISP, developed by John McCarthy while at MIT for the IBM 700/7000 series scientific computers in the late 1950s.[23] LISP introduced many features now found in functional languages, though LISP is technically a multi-paradigm language. Scheme and Dylan were later attempts to simplify and improve LISP.
至此,总用时七分三十秒。
Information Processing Language (IPL) is sometimes cited as the first computer-based functional programming language. It is an assembly-style language for manipulating lists of symbols. It does have a notion of "generator", which amounts to a function accepting a function as an argument, and, since it is an assembly-level language, code can be used as data, so IPL can be regarded as having higher-order functions. However, it relies heavily on mutating list structure and similar imperative features.
Kenneth E. Iverson developed the APL programming language in the early 1960s, described in his 1962 book A Programming Language (ISBN 9780471430148). APL was the primary influence on John Backus's FP programming language. In the early 1990s, Iverson and Roger Hui created a successor to APL, the J programming language. In the mid 1990s, Arthur Whitney, who had previously worked with Iverson, created the K programming language, which is used commercially in financial industries.
John Backus presented the FP programming language in his 1977 Turing Award lecture Can Programming Be Liberated From the von Neumann Style? A Functional Style and its Algebra of Programs. He defines functional programs as being built up in a hierarchical way by means of "combining forms" that allow an "algebra of programs"; in modern language, this means that functional programs follow the principle of compositionality. Backus's paper popularized research into functional programming, though it emphasized function-level programming rather than the lambda-calculus style which has come to be associated with functional programming.
至此,总用时十分三十秒。
以上共计10分钟左右,内容基本了解。
此为个案,没有代表性,将进行后续试验,并逐步形成统计结果
欢迎大家晒晒自己的试验结果。