语法唐
来源:互联网 发布:windows优化大师打补丁 编辑:程序博客网 时间:2024/04/28 14:21
语法糖,直译自“syntactic sugar”,原指“语法中的糖分”。
Beginning Regular Expression的译者李松峰先生有专文讨论:
含糖语法,是由Peter J. Landin创造的一个术语,指的是为一门计算机语言的语法中添加的附加物或附加成分,它不会影响语言的功能,但却能使人类使用起该语言来”更甜美”一些。含糖语法为编程人员(对计算机规范语言来说,是设计人员)提供了一种编写程序(编写规范)的替代方式,这种方式更具有实用性、更有助于形成较好的程序设计风格,或者使代码读起来更自然。但是,它不会影响形式上的可表达性,也不会让语言拥有某种新功能。
Syntactic sugar is a term coined by Peter J. Landin for additions to the syntax of a computer language that do not affect its functionality but make it “sweeter” for humans to use. Syntactic sugar gives the programmer (designer, in the case of specification computer languages) an alternative way of coding (specifying) that is often more practical, more conducive to a better programming style, or more natural to read. However, it does not typically affect the expressiveness of the formalism or permit the language to do something new.
看来程序员还这会给自己解闷,呵呵
Beginning Regular Expression的译者李松峰先生有专文讨论:
含糖语法,是由Peter J. Landin创造的一个术语,指的是为一门计算机语言的语法中添加的附加物或附加成分,它不会影响语言的功能,但却能使人类使用起该语言来”更甜美”一些。含糖语法为编程人员(对计算机规范语言来说,是设计人员)提供了一种编写程序(编写规范)的替代方式,这种方式更具有实用性、更有助于形成较好的程序设计风格,或者使代码读起来更自然。但是,它不会影响形式上的可表达性,也不会让语言拥有某种新功能。
Syntactic sugar is a term coined by Peter J. Landin for additions to the syntax of a computer language that do not affect its functionality but make it “sweeter” for humans to use. Syntactic sugar gives the programmer (designer, in the case of specification computer languages) an alternative way of coding (specifying) that is often more practical, more conducive to a better programming style, or more natural to read. However, it does not typically affect the expressiveness of the formalism or permit the language to do something new.
看来程序员还这会给自己解闷,呵呵
- 语法唐
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- 语法
- carbide.vs的debug问题
- 深入Java中文问题及最优解决方法(2)
- 指针常量与常量指针
- 一个无聊男人的疯狂《数据结构与算法分析-C++描述》学习笔记 用C++/lua/python/bash的四重实现(1) f(x) = 2f(x-1) + x^2
- SharpPcap开发包分析c#
- 语法唐
- typedef的四个用途和两个陷阱
- 好爽,一口气发了四篇帖子
- 深度和广度优先搜索
- 中文编码问题解决方法汇总
- struts2.0深入理解
- 无题
- C#字符串拼接 "+"连接与Append()方法 速度比较
- iframe