Syntactic_sugar
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( clause names a list of columns that must exist in both tables. If tables column_list)a and b both contain columns c1, c2, 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 science, syntactic 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 compilers, static analyzers, and the like, often expand sugared constructs into more fundamental constructs before processing, a process sometimes called "desugaring".
Syntactic_sugar的更多相关文章
- Haskell语法
http://www.ibm.com/developerworks/cn/java/j-cb07186.html 1. 构造符号 : 比如: 1:2:3:[] 而常用的 [1,2,3] 是一种语法糖( ...
随机推荐
- Java Hour 16 来个CURD吧!
有句名言,叫做10000小时成为某一个领域的专家.姑且不辩论这句话是否正确,让我们到达10000小时的时候再回头来看吧. 突然想到我最近一直在追的小说,作者每天都会更新两章,而且质量挺高.所以从这篇开 ...
- hdu 5312 数学
- ActiveMQ Exception: java.io.EOFException: Chunk stream does not exist
解决办法: 方法1. 去掉延迟功能:<broker xmlns="http://activemq.apache.org/schema/core " brokerName=&q ...
- uva 10972(边双连通分量)
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=33804. 思路:和poj的一道题有点像,不过这道题图可能不连通,因 ...
- CRC-16/XMODE X16+X12+X5+1 C#、C和java环境下实现
private byte[] CRC(byte[] x, int len) //CRC校验函数 { ]; UInt16 crc = ; byte da; ; UInt16[] yu = { 0x000 ...
- Android Studio导入Fresco
大概一周之前,Facebook开源了专为Android系统定制的图片下载缓存工具,当天该消息就上了各大技术论坛网站的头条,也成为了各个技术群里讨论的最主要的话题.也就在当天stay4it的QQ群里面就 ...
- LightOJ1032 Fast Bit Calculations(数位DP)
显然数位DP. dp[i][j]表示所有末尾为j的i位二进制数相邻位的数量和 初始状态dp[2][1]=1 从长度i-1转移到长度i就是在i-1位的末尾添上0或1,转移方程就是: dp[i][0]=d ...
- DataTable排序的一般方法
一.重生法dstaset.Tables.Add(dt)dataset.Tables(0).DefaultView.Sort = "id desc" 二.直接法dv = New Da ...
- ural 1247. Check a Sequence
1247. Check a Sequence Time limit: 0.5 secondMemory limit: 64 MB There is a sequence of integer numb ...
- c/c++ 笔试面试题
#include <iostream> using namespace std; class A { public: void sayHi(){ cout<<"hel ...