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] 是一种语法糖( ...
随机推荐
- Android Studio打包未签名包
Android Studio打包未签名包 好久没有写技术博客了,真有点懈怠了,作为35岁的程序员,转行重新捡起这些知识,还是挺犹豫纠结的,不过没啥其它办法,一点一滴开始吧,今天这开篇就小结点前几天工作 ...
- matlab练习程序(构造简单多边形)
简单多边形是指各边不相交的多边形. 首先计算出所有顶点中心位置. 然后求每个顶点与中心的极角. 再对极角进行排序. 连接排序后的点就行了. 结果如下: matlab代码如下: clear all;cl ...
- Mysql 对数字的格式化
format函数: 格式化浮点数 format(number, length); Formats the number X to a format like '#,###,###.##', r ...
- OD hit跟踪 run跟踪使用问题
刚学习OD不久,现在使用HIT跟踪 run跟踪功能,在我的程序里碰到点问题,还请赐教 选了一部分代码添加到HIT跟踪,在选的代码处设置断点,程序运行到断点,按单步跟踪,当执行到第二个PUSH时,程序就 ...
- SqlServer2005或2008数据库字典--表结构.sql
SELECT TOP 100 PERCENT --a.id, CASE WHEN a.colorder = 1 THEN d.name ELSE '' END AS 表名, C ...
- Json格式数据某一列。
{title : '支付费率',elCls : 'center', dataIndex :'zfrate',width:100, renderer :function(value,obj){ if(o ...
- 转 BHO API HOOK Wininet基于IE编程的一些资料
BHO原理:推荐vc base中的文章: 如何使用BHO定制你的Internet Explorer浏览器 API HOOK的基本原理:推荐C++ builder 研究中的文章: API Hook基 ...
- BZOJ3808 : Neerc2012 Labyrinth of the Minotaur
左上角和右下角不四连通等价于左下角和右上角八连通 枚举正方形的左上角,先二分出最大的边长,使得里面不含障碍物 然后再二分出最小的边长,使得两部分连通,用前缀和判断 这题WA了好久…一直对拍都没问题…于 ...
- BZOJ3532 : [Sdoi2014]Lis
f[i]表示以i为结尾的LIS长度 对于所有f[i]=1的,由S向i连边 对于所有f[i]=maxf的,由i向T连边 对于j<i,a[j]<a[i],且f[j]+1=f[i]的,j向i连边 ...
- javascript reverse string
var strReversed = str.split('').reverse().join(''); function: function reverse(str){ return str.spli ...