zoukankan      html  css  js  c++  java
  • 声明式(编程)语言是解释型语言

    声明式语言包包括数据库查询语言(SQLXQuery),正则表达式,逻辑编程,函数式编程和组态管理系统。

    声明式编程透过函数、推论规则或项重写(term-rewriting)规则,来描述变量之间的关系。它的语言运行器(编译器解释器)采用了一个固定的算法,以从这些关系产生结果。

    https://baike.baidu.com/item/声明式编程/9939512

    Aren’t We Just Hiding the Implementation?

    Eventually, every piece of our code must be implemented somewhere. In declarative languages, the implementation is up to whoever interprets the code:

    • SQL is handled by a database engine.
    • A browser will interpret HTML.
    • A YAML configuration file could be handled by a build server.

    When we apply some declarative techniques to our imperative languages, it’s up to us to provide the implementation. Even the LINQ extension methods are implemented in C#, they’re just not in our own codebase. So we’re actually just abstracting away implementation details. Then the question is: how far do we go with this abstraction? You will need to find what works best for you, but a good starting point for me is that public methods (i.e. your public API) should contain a minimum set of statements, and these should all be easily readable. The contents of your public method should tell you what is happening, not how.

    https://blog.ndepend.com/declarative-programming-depth/

  • 相关阅读:
    Java使用printf格式化日期
    Java时间Date类
    Java数组
    Spring Cloud Stream
    Spring Cloud Bus
    Spring Cloud Config
    api服务网关?
    SPRINGBOOT集成SWAGGER2
    MySQL锁(一)全局锁:如何做全库的逻辑备份?
    Spring的FactoryBean
  • 原文地址:https://www.cnblogs.com/feng9exe/p/10065049.html
Copyright © 2011-2022 走看看