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. phpcms V9 改造:输出sql语句

    .修改数据库驱动 phpcms/libs/classes/mysql..修改模型 phpcms/libs/classes/model..调用 使用自定义模型类查询完成之后,调用模型类的lastsql( ...

  2. VS制作软件安装项目,版本控制和软件升级

    具体如何利用VS制作安装项目,请到我的CSDN地址下载超详细的文档(该文档来自网络) http://download.csdn.net/detail/u012373717/8723335 我要说的是版 ...

  3. MVC RenderSection

    简要使用介绍 @RenderSection在母版页中占个位,然后让使用此母版页的子页自己去呈现他们的Section. 在母版页_Layout.cshtml中定义@RenderSection(" ...

  4. Making raycast ignore multiple layers

    I know how to make the raycast ignore a layer but I want it to ignore layers 9 and 10 but collide wi ...

  5. BZOJ4347 : [POI2016]Nim z utrudnieniem

    将石子从小到大排序,然后DP. 设$f[i][j][k]$表示考虑了前$i$堆的石子,当前扔掉的堆数模$d$为$j$,没有扔掉的石子的异或和为$k$的方案数. 因为石子排过序,所以转移的复杂度为$O( ...

  6. BZOJ2675 : Bomb

    首先通过不断翻转坐标系,假设三个点以横坐标为第一关键字,纵坐标为第二关键字排序后A在B前面,B在C前面. 那么只需要处理以下两种情况: 1.B的纵坐标在AC之间,这时三个点的距离和为$2((x_C+y ...

  7. BZOJ3073 : [Pa2011]Journeys

    用线段树套链表维护所有边,用set维护未访问过的点 然后BFS,每次在线段树上找边,然后在set中查询点 一条边使用之后就没有用了,所以在链表中将它删去 时间复杂度$O((n+m)\log n+m\l ...

  8. 为tomcat 安装 native 和配置apr

    yum install -y apr-devel openssl-devel gcc 安装native cd /lxyy/tomcat7/bin tar zxvf tomcat-native.tar. ...

  9. 【BZOJ】1082: [SCOI2005]栅栏(二分+dfs)

    http://www.lydsy.com/JudgeOnline/problem.php?id=1082 题意:n个给出木板,m个给出木板.可以将那m个木板锯成泥想要的长度.问最大能锯成多少个给出的n ...

  10. POJ 3277 City Horizon(扫描线+线段树)

    题目链接 类似求面积并..2Y.. #include <cstdio> #include <cstring> #include <string> #include ...