https://en.wikipedia.org/wiki/Syntactic_sugar

http://stackoverflow.com/questions/11366006/mysql-on-vs-using

http://dev.mysql.com/doc/refman/5.7/en/join.html

The USING(column_list) clause names a list of columns that must exist in both tables. If tables a and b both contain columns c1c2, and c3, the following join compares corresponding columns from the two tables:

a LEFT JOIN b USING (c1,c2,c3)

Previously, a USING clause could be rewritten as an ON clause that compares corresponding columns. For example, the following two clauses were semantically identical:

a LEFT JOIN b USING (c1,c2,c3)
a LEFT JOIN b ON a.c1=b.c1 AND a.c2=b.c2 AND a.c3=b.c3

In computer sciencesyntactic sugar is syntax within a programming language that is designed to make things easier to read or to express. It makes the language "sweeter" for human use: things can be expressed more clearly, more concisely, or in an alternative style that some may prefer.

For example, many programming languages provide special syntax for referencing and updating array elements. Abstractly, an array reference is a procedure of two arguments: an array and a subscript vector, which could be expressed as get_array(Array, vector(i,j)). Instead, many languages provide syntax like Array[i,j]. Similarly an array element update is a procedure of three arguments, something like set_array(Array, vector(i,j), value), but many languages provide syntax like Array[i,j] = value.

Specifically, a construct in a language is called syntactic sugar if it can be removed from the language without any effect on what the language can do: functionality and expressive power will remain the same.

Language processors, including compilersstatic analyzers, and the like, often expand sugared constructs into more fundamental constructs before processing, a process sometimes called "desugaring".

Syntactic_sugar的更多相关文章

  1. Haskell语法

    http://www.ibm.com/developerworks/cn/java/j-cb07186.html 1. 构造符号 : 比如: 1:2:3:[] 而常用的 [1,2,3] 是一种语法糖( ...

随机推荐

  1. hdu 2444 二分图判断与最大匹配

    题意:有n个学生,有m对人是认识的,每一对认识的人能分到一间房,问能否把n个学生分成两部分,每部分内的学生互不认识,而两部分之间的学生认识.如果可以分成两部分,就算出房间最多需要多少间,否则就输出No ...

  2. C++的那些事:数据与类型

    一.前言 最近在看C++Primer第5版,先前已经看过第4版,但是发现第5版在整个知识布局与个别知识的讲解上跟第4版差别还是挺大的,尤其是新增了C++11的内容,正如孟岩老师在第5版前言中所讲:“现 ...

  3. 【codevs2822】爱在心中 tarjan 缩点+理解

    [codevs2822]爱在心中 2014年1月26日5580 题目描述 Description “每个人都拥有一个梦,即使彼此不相同,能够与你分享,无论失败成功都会感动.爱因为在心中,平凡而不平庸, ...

  4. AsyncTask下载JSON

    public class HttpUtils { // 从网络url上下载字符串 public static String getHttpStr(String url) { HttpClient ht ...

  5. Selenium自动化中DOM,XPATH,CSS定位Web页面对象的优劣性分析

    加速IE浏览器自动化执行效率:Selenium自动化中DOM,XPATH,CSS定位Web页面对象的优劣性分析 1.技术背景       在Web应用中,用户通过键盘在输入框中输入值和鼠标点击按钮,链 ...

  6. RabbitMQ原理

    vhosts(broker) connection 与 channel(连接与信道) exchange 与  routingkey(交换机与路由键) queue(队列) Binding(绑定) cli ...

  7. js:数据结构笔记12--排序算法(2)

    高级排序算法:(处理大数据:百万以上) 希尔排序:是插入排序的优化版: 首先设置间隔数组,然后按照每个间隔,分别进行排序: 如第一个间隔为5,首先a[5]与a[0]进行插入排序;然后a[6]和a[0] ...

  8. js:语言精髓笔记5----语言分类

    计算模型:源于对计算过程的不同认识: 1.基于不同计算模型一般分为://教科书的一般分类 命令式语言: 函数式语言: 逻辑式语言: 面向对象程序设计语言: 2.基于程序本质分类:  //编程的经典法则 ...

  9. Div 添加阴影

    <style type="text/css">.mydiv{   width:250px;height:auto;border:#909090 1px solid;ba ...

  10. Encoding

    Problem Description Given a string containing only 'A' - 'Z', we could encode it using the following ...