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] 是一种语法糖( ...
随机推荐
- 在Windows中使用MinGW编译X264
转自:http://www.cnblogs.com/xiongjiaji/archive/2012/06/08/2541265.html 参考:http://ayobamiadewole.com/Bl ...
- 理解HTTP session原理及应用
转自:http://www.2cto.com/kf/201206/135471.html 一.术语session在我的经验里,session这个词被滥用的程度大概仅次于transaction,更加有趣 ...
- Android的ListView详解
在android开发中ListView是比较常用的组件,它以列表的形式展示具体内容,并且能够根据数据的长度自适应显示.抽空把对ListView的使用做了整理,并写了个小例子,如下图. 列表的显示需要三 ...
- Grunt上手指南<转>
原文链接:http://www.hulufei.com/post/grunt-introduction 安装 如果之前有装过grunt,卸载之 npm uninstall -g grunt 安装gru ...
- POJ3254 Corn Fields(状压DP)
题目给个n×m的地图,1可以放玉米0不可以,现在要放玉米,玉米上下左右不能相邻,问放法有几种. 当前一行的决策只会影响下一行,所以状压DP之: dp[i][S]表示前i行放完且第i行放玉米的列的集合是 ...
- JavaBean中的get/set 的命名规范
最近的struts项目中遇到了这样的问题: 我的action中全局变量明明有getset方法,而且是自动生成的,但是在使用的时候,总是说找不到这个属性的getset方法,取不到从jsp传来 的值, ...
- 关于求解不定方程的n(n-1)=2m(m-1)的解法的总结
主要参考下面两篇论文 1.<不定方程x(x-1)=Dy(y-1)的解法> 2.<用递推公式求一个不定方程的正整数解> 原有题目意思是 记得有一次全班去唱K, 其中有个活动是情歌 ...
- html页面元素加载顺序
一般来说,添加背景图片有三种办法: 直接写在标签的style里面,如: <div style="background-image:url('images/Css.JPG')" ...
- 【BZOJ】2463: [中山市选2009]谁能赢呢?(博弈论)
http://www.lydsy.com/JudgeOnline/problem.php?id=2463 好神的证明! 首先对于n是偶数,一定能被1*2的骨牌覆盖!所以从起点开始,先手一定走的是骨牌的 ...
- java.lang.String 类的所有方法
java.lang.String 类的所有方法 方法摘要 char charAt(int index) 返回指定索引处的 char 值. int codePointAt(int index) 返回指定 ...