由买买提看人间百态

topics

全部话题 - 话题: syntactic
1 2 3 4 5 下页 末页 (共5页)
n*w
发帖数: 3393
1
来自主题: Programming版 - Linq不是syntactic sugar
下班浏览的一下goodbug给的那篇硕士thesis。先不说论文质量。通篇也没说linq是
syntactic sugar。
其中涉及linq和syntactic sugar有关系有两处。
1. A number of new features were added to C# 3.0 in order to provide LINQ.
Individually most of these features can be classified as syntactic sugar
that, while helpful in cutting down on the tediousness of repetitive code,
have viable – albeit more verbose – workarounds in the language。
这里讲到linq用了c# 3.0里syntactic sugar的语言features。最明显的应该是type
inference。很多情况linq返回的type非常复杂。type inference在这里是极方便。
2. The q... 阅读全帖
a*****e
发帖数: 1700
2
来自主题: Programming版 - Linq不是syntactic sugar
各位吵得好热闹,我来插一句嘴,呵呵
所谓 syntactic sugar,是指和 semantics 无关的,纯语法层面的转化
而 LINQ 可以看做是两部分,一部分是它提供的特殊语法,可以直接 desugar,变成标
准的 C# 语句,所以这部分是 syntactic sugar.
另一部分,是 LINQ 提供的库函数,这些为它的 semantics 提供了具体的实现,所以
不能称为 syntactic sugar
笼统地说 LINQ 是,或者不是 syntactic sugar,都是不准确的。包括 goodbug 引的
那片 paper,也只是说 LINQ 提供了 syntactic sugar,而不是说 LINQ 除了
syntactic sugar 就没有其它内容了。
就比如 Haskell 里面的 Monad,语法部分的 do syntax,是 syntactic sugar,但是
这个 do syntax 被 desugar 为 bind 和 return 两种函数操作,但是具体实现 bind
和 return 的语义则需要程序员(或者库函数)提供 implementati... 阅读全帖
n*w
发帖数: 3393
3
来自主题: Programming版 - Linq不是syntactic sugar
非goodbug一方的人在前面帖子里都同意sql-like的linq syntax是dot notation
syntax的syntactic sugar。这个帖子讨论的整个linq是不是syntactic sugar。
有人认为oop之外的东西都是syntactic sugar。
n*w
发帖数: 3393
4
来自主题: Programming版 - Linq不是syntactic sugar
Why something unrelated to syntactic sugar can close the case of syntactic
sugar?

t
g*****g
发帖数: 34805
5
来自主题: Programming版 - Linq不是syntactic sugar
Because syntactic sugar is to make expressions more concise, not to add more
capabilities to the language. To suggest Linq is more than a syntactic
sugar, you need to show examples like I did with Reflection when comparing
Java and C++, i.e. something Java can do and C++ cannot. Reflection leads to
the likes of IoC and AOP frameworks which is absent from C++ and that's why
it's not a syntax sugar. So far you are going loops and not showing any
libraries c# can implement and Java cannot.
n*w
发帖数: 3393
6
来自主题: Programming版 - Linq不是syntactic sugar
是的,那个比喻是讨论很费劲的原因。马上应验。他认为只要是java语言没有的
syntactic sugar,就是无关紧要的。我都避免讨论syntactic sugar和productivity的
关系。这些没有对错,量化的东西可能更是被扯到哪里去了。我倒想看看他关于large
scale web application的一些帖子。
G***l
发帖数: 355
7
来自主题: Programming版 - Linq不是syntactic sugar
他要是说些java的什么挺好的,但是我就不是不明白他为什么那么攻击性。我们想讨论
些C#里面的功能,碍着他什么事了?syntactic sugar说的只是compiler的一些转换。
但是linq里面那些functional的东西,没有语言底层特性的支持,你转换来转换去也搞
不出一样的东西。按他那么说,所有functional language里面那些特色都是syntactic
sugar,人家那么多研究fp的大牛还不郁闷了。

large
c****r
发帖数: 185
8
syntactic refers to the grammar of a language. For example, to declare a
variable, in C, you do it like "int a", in pascal, you do it like "a:
integer".
semantic refers to the meaning of the grammar. For example,
"1/2", in C, this is an integer division, the result is 0.
In some other language, it is a real division, the result is 0.5.
a***n
发帖数: 404
9
so the semantic ones are in a much higher level, right?

syntactic refers to the grammar of a language. For example, to declare a
variable, in C, you do it like "int a", in pascal, you do it like "a:
integer".
semantic refers to the meaning of the grammar. For example,
"1/2", in C, this is an integer division, the result is 0.
In some other language, it is a real division, the result is 0.5.
a***n
发帖数: 404
10
ok,现在我想定义一个表达语义的合适的方法,比方说你干逼的事情,告诉别人了,大家
都笑了,但是作为一个计算机工具,该用怎么一种合适的方式把你干逼的事情纪录下来
呢? :P
我猜像字典那样来一个description肯定不行的,但是如果只对干,和 逼作词性分析,
那又只是syntactic的分析了。
不知道现在有没有什么好的工具可以以好的形式(非描述性地,结构化地)表现出语义这
样的结果?
c*****t
发帖数: 1879
11
如果你是指,syntactic 和 semantic parsing 的话,看一下 dragon book。
如果你是指 automatic documenting 写的程序,看一下 Annotation-Oriented
Programming.

大家
k*****r
发帖数: 1435
12
语言学出身的人能来答这个问题么
syntactic,也就是句法,指的是语言的结构,简单说就是名词动词形容词等等不同词
性的词应该按什么顺序在某一个语言里出现,还有某一种词性的词组可以衍生出什么新
的结构(比如VP->V NP)
结构正确的句子不一定有意义(semantic,也就是语义,指的是语言表达的意义)。
一个著名的例子是:“Colorless green ideas sleep furiously“。这个句子句法上
完全正确,形容词名词动词副词各就各位,但是一点不make sense,正常生活中人不会
明白这个句子要表达什么意思。
比较简单的理解语义和句法的区别的方法是:句法是讲一个东西往哪摆的,语义是研究
摆那以后对句子的interpretation的影响的。
D********g
发帖数: 650
13
S-> NP VP, Syntactic
"some company acquired xxx" semantic
k*****a
发帖数: 1463
14
来自主题: Programming版 - Linq不是syntactic sugar
As some suggested, there is lot of syntactical sugars from either java or C#
.
However, the language features are something that makes them different
typing( reified generics, use-site covariance, late/dynamic binding).
functional programing (expression tree, closures, lambda).
for these to work as C#, java developer need to add own logical coding (and
associated tests) to achieve and (verify) it.
k*****a
发帖数: 1463
15
来自主题: Programming版 - Linq不是syntactic sugar
This guy typically don't know what he is talking about, neither does he
understand the context. His intention really begs to ask whether he is able
to follow the logic and understood the questions.
If he don't understand what he is talking about, why bother. When you talk
about A, syntactic sugar , he was thinking you are on topic B ... LOL
What qualifies as syntax sugar? From his statement, he admitted Linq is just
the opposite (introduce logic coding for a sugar).
"Linq is a syntax sugar. What... 阅读全帖
g*****g
发帖数: 34805
16
来自主题: Programming版 - Linq不是syntactic sugar
I show concrete examples and references, you go in loops making empty points
. Now it proves your ignorance that you don't even know what's syntax sugar.
This is an academic discussion why Linq is a syntax sugar. And back to
hadoop, if M$ chose it to call to Linq to HPC, wouldn't it sound like Linq
is so powerful it can be used to write a Hadoop framework effectively? The
end result, a complete failure.
http://etd.auburn.edu/etd/bitstream/handle/10415/2097/Ahmad%20M
[excerpt]
Syntactic sugar is ... 阅读全帖
k*****a
发帖数: 1463
17
来自主题: Programming版 - Linq不是syntactic sugar
LINQ is syntactic sugar only with regard to C# language, not to Java. Java
does not have strong typed dynamic or late binding, so to Java it is a
feature.

points
sugar.
n*w
发帖数: 3393
18
来自主题: Programming版 - Linq不是syntactic sugar
Yes, the "from... where... select" is syntactic sugar of the method call way
to write it. They are all linq in c#. linq is a group of technologies
n*w
发帖数: 3393
19
来自主题: Programming版 - Linq不是syntactic sugar
linq is monad. Do you believe monad is just syntactic sugar?
n*w
发帖数: 3393
20
来自主题: Programming版 - Linq不是syntactic sugar
Omg. you are saying all the Turing compete languages are syntactic sugar of
assembly

more
to
why
k*****a
发帖数: 1463
21
来自主题: Programming版 - Linq不是syntactic sugar
All languages are just syntatic sugar.... as it just made 0/1s more concise.
Talking syntactic sugar without respect to what is idiotic.
You can write C++ to achieve reflection as well with help of your compiler.

more
to
why
n*w
发帖数: 3393
22
来自主题: Programming版 - Linq不是syntactic sugar
Because you are going in loop and I don't want to answer something I've
answered. The topic is about if linq is syntactic sugar, not comparing
library of the two systems.

,
n*w
发帖数: 3393
23
来自主题: Programming版 - Linq不是syntactic sugar
I don't think monad is syntactic sugar.

I'
discussion
g****r
发帖数: 1589
24
来自主题: Programming版 - Linq不是syntactic sugar
好虫看不上.Net已经是由来已久的了,你是新来的吧
在他看来,每次你说点啥.Net的东西就是在挑战他Java的地位,所以他就会搬出一堆
Java Library多,又open的论调来跟你吵,他这么说的也对,Java作为open source的
主力在一线公司里就是主流
不过如果你想说.Net在某些方面强于Java的话,你也别指望他能同意你,他心里同意嘴
上也不会同意的,所以就别浪费时间啦,这种讨论就是无解,最后基本就发展到无聊蛋
疼的斗嘴
不过这这种类型的吵架本论坛到处都是,比如车版日系vs德系;PDA版安粉vs果粉;摄
影版nikon vs canon;禁枪派vs拥枪派;一句话,北美的华人就是闲的蛋疼

syntactic
n*w
发帖数: 3393
25
来自主题: Programming版 - Linq不是syntactic sugar
标记一下。
你是不是认为lambda expression和c#里的FPfeature都是syntactic sugar?
g*****g
发帖数: 34805
26
来自主题: Programming版 - Linq不是syntactic sugar
C# developers said so.
Lambda expression is another powerful syntactic sugar making C# functional.
http://weblogs.asp.net/dixin/archive/2009/11/29/understanding-c
Arguing whether it's syntax sugar is really moot though, Java has beaten C#
to deaths in terms of jobs, killer apps, etc. That's what I care about. Only
junior developer likes you cherish such trivial feature like it's religion.
Get a life.
n*w
发帖数: 3393
27
来自主题: Programming版 - Linq不是syntactic sugar
你很善于应用google。
这样问吧,你认不认为c#的Delegate是不是syntactic sugar?

.
#
Only
religion.
n*w
发帖数: 3393
28
来自主题: Programming版 - Linq不是syntactic sugar
再改一下问题,more general。
“First-class function”是不是syntactic sugar?

.
#
Only
religion.
n*w
发帖数: 3393
29
来自主题: Programming版 - Linq不是syntactic sugar
troll
和主题没有关系。你可以再开个贴讨论类库。syntactic sugar是你这样定义的吗?
g*****g
发帖数: 34805
30
来自主题: Programming版 - Linq不是syntactic sugar
自己看wiki呗。跟你这种无知的人争真是浪费时间。
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:
n*w
发帖数: 3393
31
来自主题: Programming版 - Linq不是syntactic sugar
最后解释一下。
帮你贴全
“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”
最后关于functionality的一个问题:Java anonymous inner class怎样实现access非
final variables?
自己想想吧,不用回帖了。

can
do:
r*g
发帖数: 3159
32
来自主题: Programming版 - Linq不是syntactic sugar
太搞了,不想争论了还非要抢着说最后一句。
我建议你把标题改为 Linq 不是 c# 的 syntactic sugar, 这样意思更明确,也省得有
人来喷整个c#都是sugar了。

him
★ 发自iPhone App: ChineseWeb 7.8
n*w
发帖数: 3393
33
来自主题: Programming版 - Linq不是syntactic sugar
I was talking to response Godel's. it's Ignorance to say any language is all
syntactic sugar.
n*w
发帖数: 3393
34
来自主题: Programming版 - Linq不是syntactic sugar
我还从来没骂过人。那个发troll贴的攻击性骂人的话用在自己身上倒很合适。
在这个贴里发过非troll贴的人没意见的话,我将删除这个有太多垃圾troll的thread,
再重新发个关于linq,FP和syntactic sugar的总结。
q*****i
发帖数: 30
35
我在paper里面说我用parser assign syntactic tag. 结果一个reviewer 就刁难我,
说 a parser does much more than assigning syntactic tags to sentences. It
normally outputs the syntactic structure of a sentence in the form of a
parse tree.
我想知道syntactic parser 就是为了生成parse tree 还是为了分析sentence
structure, 结果形成了一个parse tree。或者说这些syntactic tag 与parse tree的
关系。
我的理解是:a parser is designed to recognize the constituents in the
sentence and their relations, whose results would be a set of syntactic tags
assigned to the sentence
l*****f
发帖数: 2198
36
偷取商业机密卖给中国某国企 (很有可能是军工企业)
HOUSTON - Several people have been charged after federal agents raided a
home in the upscale neighborhood of Hedwig Village in West Houston Tuesday.
Agents raided the $1.6 million home of Shan Shi, 52, off of Buckingham,
seizing property and carrying out boxes of potential evidence.
Shan is accused of creating a company in Houston and hiring employees to
allegedly steal trade secrets from a Houston company which manufactures “
syntactic foam.”
Shan’s suspected network o... 阅读全帖
G*******s
发帖数: 4956
37
Blinded By Tradition:
An Open Letter to Dave Hunt
Regarding His Newly Published Attack Upon the Reformation, What Love Is This
? Calvinism's Misrepresentation of God
James White
Updated 5/16/02, see bottom of file
Dear Dave,
In the period of time since I finally received my own copy of your book (you
may recall I scanned through it while standing at your table in St. Louis a
t the PFO Conference) I have gone through a number of different emotions. A
t first I was just going to do one Dividing ... 阅读全帖
G***a
发帖数: 27294
38
来自主题: loseweight版 - 新官上任果然三把火。
。。。新警察/////这是自我调侃话。。。
平时真是过于注意形象了,所以经常被人欺负,,,很多年了,委屈太多,偶尔忍不住
。 :)
PS: 母语不母语,不在领会不领会微妙意思,这个是可以后天学的,跟口音一样,虽
然难学,但是是可学的,而且我领会的特好。
最不可学的,也是区分母语的关键性marker是syntactic parsing。。。。这话题就长
了,有兴趣咱慢慢讨论。~~~
这我真不是跟你较真啊,是真的syntactic parsing比semantics更能区分母语不母语,所以你不能拿semantics好不好和母语不母语挂钩。这是有大量研究的。。。
G***a
发帖数: 27294
39
来自主题: loseweight版 - 新官上任果然三把火。
嗯,我明白你的意思~~~~ 我是学了linguistics以后的强迫症。
非母语的人,其实在词义理解,和语音上面,是完全可以超越母语的人的。
这点,其实大多数中国人都认识错误。
这种情况,在世界上其他国家(特别是欧洲国家),很多,而且非常普遍。
语音和词汇掌握,都只是跟文化程度,和不断练习纠正有关的。与是不是母语关系不大

而syntactic parsing(一些特殊句子断法)和prosody(一些内在语言韵律)才是深入
骨髓的。
再满腹经纶,再口若悬河的nonnative也跟文盲加结巴的native有本质
区别。
传说这里面还有故事。以前美国往俄国派的间谍,俄语暴牛。
是那种,连续疲劳审问N天,也能对答如流,毫无口音外露,也无语法词汇句法文化理
解破绽的人。
最后俄国人,就是靠syntactic parsing这个技巧,一下子把间谍整崩溃了。。。。
G***a
发帖数: 27294
40
来自主题: WaterWorld版 - 关于学习英语的想法
lz你想法是很好的,但是对语言学的文献需要更深的阅读,才能把你的想法organize在
一起
现在你的文章把好几个概念Mix在一起了,如果你有兴趣,我可以给你提供几个
reference
第一个你要明白的问题是,婴儿第一语言获得(first language acquisition)是
statistical learning (这是现在流行的理论)。
婴儿并不是definitively知道,什么是猫,什么是狗,什么叫“五颜六色”,什么叫“
轻重缓急”
婴儿是根据平时的context来“计算”,说哪个词哪句话,对的可能性最大,能够得到
最大的reward
成人,在学习的时候,是algebric learning。主语,谓语,宾语,你知道一个公式然
后往里套
所以学习的pattern不一样。成人没有试验chances的过程。
第二个问题,每个语言的semantic mapping,并不是完全一样的。也就是说,
字典对着字典翻译出来的意思,并不map到人脑子里完全一样的概念。这点在很多计算
模型里都有
你可以搜索LSA来看看。这是计算semantic mapping的一个matrix
简单... 阅读全帖
t******n
发帖数: 2939
41
来自主题: WaterWorld版 - [合集] 关于学习英语的想法
☆─────────────────────────────────────☆
ppzhang07 (ppzhang) 于 (Thu Apr 5 17:16:14 2012, 美东) 提到:
这篇文章主要源于与面包的对话,最近在看的书,还有一些其他的谈话。
前两天面包让我帮他写一段话,表达一件事。我写完之后他截取了其中一句话,问那句
话翻译成中文怎么说,为什么像绕口令一样。当时我给他翻译了一下,然后说之所以像
绕口令是因为中英文结构不同,同样的事让我用中文说是另一种样子,虽然两者要表达
的意思是一样的。我还说学习语言相当于学习一种文化思想,不是简单的用一种文字替
代另一种文字,如果你把什么话都从英文翻到中文来记,八成英文学不好中文也要走样
。面包说怎么听起来这么复杂。
然后我问他是否记得小时候怎么学的中文,肯定不是通过另一种文字关联起来的吧。我
想估计没人记得自己是怎么学会母语的,如果谁想说“大环境”,“耳濡目染”,八成
也是看别人说的。我很喜欢Vygotsky的理论,所以这里引用他的说法。首先学习的方法
不同,学母语是感官和语言通力合作形成各种概念。你指着一个东西问这是什... 阅读全帖
m********e
发帖数: 127
42
来自主题: AnthroLing版 - 不妨来做个binding theory的简单实验
我觉得要区分discourse level和syntactic level
syntactic theory基本上是不考虑discourse
level...也就是不考虑一个句子之外的context.
如果考虑context的话,很多东西没办法讨论
你觉得呢?

生成
m********e
发帖数: 127
43
来自主题: AnthroLing版 - 不妨来做个binding theory的简单实验
i remember i was arguing there are two kinds of binding relationship:
syntactic binding and non-syntactic binding
m********e
发帖数: 127
44
来自主题: AnthroLing版 - 不妨来做个binding theory的简单实验
non-syntactic binding may be determined by pragmatic or discourse constraints
or you could divide it into syntactic binding and discourse prominence
z*******n
发帖数: 1034
45
http://www.informit.com/articles/printerfriendly/2211695
Introduction to "The Java Language Specification, Java SE 8 Edition"
By James Gosling, Gilad Bracha, Alex Buckley, Bill Joy, Guy L. Steele
Date: Jun 12, 2014
The Java® programming language is a general-purpose, concurrent, class-
based, object-oriented language. It is designed to be simple enough that
many programmers can achieve fluency in the language. The Java programming
language is related to C and C++ but is organized rather dif... 阅读全帖
k*******3
发帖数: 918
46
来自主题: Detective版 - Master Li Hongzhi was really dying?
Master Li Hongzhi in June 10th on their website published a new verse" what
assist master in Fa rectification", regardless of is the disciple or often
see always feel a bit sour, a generation of master, the Dharmakaya countless
, called" the Lord Buddha" the Falun Gong Cult founder so depressed, suffer
unspeakably, hated by scum, people there is immeasurably vast difference, a
sad. But most lets people sadly as dying like a segment of words aroused all
extremely guess.
Scripture says:" for a Daf... 阅读全帖
b***e
发帖数: 1419
47
这个在calculus的定义里很简单,就是一个syntactic check: 如果从某一位小数开始
都是9,那么这个数不是normal form。否则是normal form。 根据calculus的公理系
统(记得是8条),可以推出:0.999... = 1。所以每个有限小数都可以有两个不同的
表示。于是人为的扔掉一个。
s*****r
发帖数: 43070
48
那书读起来如同天书,其他的算法书如同小儿书,里面随便一道题,大多数的妈农估计
都要歇菜。当然也没多大用,没几个妈农需要琢磨算法的。
一共有5本,都是天书啊。
Volume 1 – Fundamental Algorithms (chapters 1 and 2)
Volume 2 – Seminumerical Algorithms (chapters 3 and 4)
Volume 3 – Sorting and Searching (chapters 5 and 6)
Volume 4 – Combinatorial Algorithms (chapters 7 and 8 released in several
subvolumes)
Volume 5 – Syntactic Algorithms (as of 2011, estimated in 2020) (chapters 9
and 10)
A****s
发帖数: 932
49
来自主题: Military版 - 关于Chmosky 和汉语
这是网上抄来的:
Chomsky's influential book Syntactic Structures [2] was first published in
1957 and was regarded to be the standard view in linguistics for a long time
. In 1959 Chomsky's famous review of Skinner's book Verbal Behaviour [2][4]
was published and became one of the most decisive texts in linguistics.
According to the nativist Chomsky, the behaviourist view failed to explain
how children are able to produce utterances which they have never heard
before. Moreover, utterances of adult careta... 阅读全帖

发帖数: 1
50
来自主题: Military版 - 有生物千老自学python的吗?
你们一帮三脚猫。
语言的复杂性都是一样的。
拼就拼在syntactic sugar和libraries。
1 2 3 4 5 下页 末页 (共5页)