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/

  • 相关阅读:
    ASP.NET 概述
    用vs调试项目页面无样式
    eniac世界第二台计算机
    汇编语言
    操作系统发展史
    网站架构发展
    简单分布式系统构建知识
    Android常用adb命令
    USB 3.0规范中译本 第4章 超高速数据流模型
    ECMAScript 6 &ECMAScript 5(在线手册)
  • 原文地址:https://www.cnblogs.com/feng9exe/p/10065049.html
Copyright © 2011-2022 走看看