• The scheme programming language--General description


    Scheme is a general-purpse computer programming language, supporting operations on structrued data, as well as operations on more traditional data.

    Its rich set of data types and flexible control structures make it a truly versatile language.

    Scheme is a fairly simple language to learn, since it is based on a handful of syntactic forms and semantic concepts and since the interactive nature of most implementations encourages experimentation. Scheme is a challenging language to understand fully however; developing the ability to use its full potential requries careful study and practice.

    New implementations are fast. The relative inefficiency that sometimes remains results from run-time checks that support generic arithmetic and help programmers detect and correct various common programming errors, which could be disabled.

    The storage required to hold the contents of an object is dynamically allocated as necessary and retained until no longer needed, then automatically deallocated, by garbage collector that periodically recovers the storage used by inaccessible objects. Simple atomic values are represented as immediate value, incuring no allocation or deallocation overhead.

    Regardless of representation, all objects are first-class data values; because they are retained indefinitely, they may be passed freely as arguments to procedures, returned as values from procedures, and combined to form new objects.

    Mutable objects, the values are pointers to the actual storage. These pointers remain behind the scenes, however, and programmers need not be conscious of them except to understand that the storage for an object is not copied when an object is passed to or returned from a procedure.

    At the heart of the Scheme is a small core of syntactic forms from which all other forms are built. These core forms, a set of extended syntactic forms derived from them, and a set of primitive procedures make up the full Scheme language. An interpreter or compiler for Scheme can be quite small and potentially fast and highly reliable. The extended syntactic forms and many primitive procedures can be fefined in Scheme itself, simplifying the implementation and increasing reliability.

    In Scheme, a procedure definition may appear within another block or procedure, and the procedure may be invoked at any time thereafter, ven if the enclosing block has completed its execetion. A procedure carries the lecical context along with its code.( Continuation)

    Many algorithms are most elegantly or efficiently specified recursively. A tail call occurs when one procedure directly returns the result of invoking another procedure; Implement tail calls as jumps.(尾递归优化). Tail recursion is used to express iteration or looping.

    Scheme sipports the definition of arbitrary control structures with continuations. A continuation is a procedure that embodies the remainder of a program at a given point in the program. A continuation may be obtained at any time during the execution of a program. As with other procedures, a continuation is a first-class object and may be invoked at any time after its creation.(后续详细展开)

    Define new syntactic forms, or syntactic extensions, by writing transformation procedures that determine how each new syntactic form maps to existing syntactic forms. These transformation procedures are themselves expressed in Scheme with the help of a convenient high-level pattern language that automates syntax checking, input deconstruction, and output reconstruction.

    By default, lexical scoping is maintained through the transformation process, but the programmer can exercise control over the scope of all identifiers appearing in the output of a transformer.

  • 相关阅读:
    ElasticSearch可视化工具 Kibana
    ElasticSearch数据库同步插件logstash
    powerDesigner 一些设置
    springcloud 之 bus 消息总线
    zipkin 服务追踪
    配置文件优先级的问题
    Hystrix 断路器
    feign 负载均衡熔断器
    zuul 整理
    后端——框架——容器框架——spring_boot——《官网》阅读笔记——第四章节11(集成JMS)——待补充
  • 原文地址:https://www.cnblogs.com/cainfeng/p/4527271.html
Copyright © 2020-2023  润新知