什么泡面最好吃|
手指经常抽筋是什么原因|
阑尾炎吃什么药最有效|
硬度不够吃什么好|
男人为什么会得前列腺炎|
紧张的反义词是什么|
真菌感染吃什么药|
马步鱼为什么是甜的|
缺蛋白质吃什么补得快|
wrangler是什么牌子|
95年属什么的生肖|
缓释是什么意思|
五行中什么生水|
攀龙附凤是什么生肖|
小王子讲了什么故事|
身上长红痣是什么原因|
枸杞有什么作用和功效|
麻疹是什么症状|
什么的|
破釜沉舟的釜是什么意思|
快车和专车有什么区别|
开什么店最赚钱投资小|
任正非用的什么手机|
面瘫是什么原因引起的|
阿莫西林不能和什么一起吃|
发狂是什么意思|
尿潜血1十是什么原因|
春天开的花都有什么花|
十二指肠霜斑样溃疡是什么意思|
子宫息肉有什么症状|
心绞痛是什么症状|
感冒咳嗽吃什么药止咳效果好|
海东青是什么鸟|
淮山是什么|
四九城是什么意思|
5.22是什么星座|
儿童嗓子哑了什么原因|
肝做什么检查最准确|
乙肝两对半和乙肝五项有什么区别|
芭比q是什么意思|
血小板偏低有什么危害|
拔牙后注意什么|
逍遥丸什么时候吃|
棺材用什么木材做最好|
头顶冒汗是什么原因|
低压高什么原因|
头晕是什么情况|
减脂期吃什么|
易烊千玺的爸爸是干什么的|
经常吐口水是什么原因|
什么是慢性病|
二月十九是什么星座|
优是什么意思|
牙痛 吃什么药|
糖粉和白糖有什么区别|
6969是什么意思|
巩固是什么意思|
橄榄菜长什么样子图片|
精子为什么叫怂|
长此以往什么意思|
磨牙吃什么药能治好|
断掌什么意思|
什么是睡眠障碍|
穿丝袜有什么好处|
金箔是什么|
经常放屁是什么问题|
长征是什么意思|
鳄鱼怕什么|
四大金刚是什么意思|
深海鱼油什么牌子好|
泓字五行属什么|
切屏是什么意思|
氟斑牙是什么原因造成的|
三点水及念什么|
手足口疫苗什么时候打|
规培是什么|
周公解梦梦见蛇是什么意思|
金句是什么意思|
为什么手指会脱皮|
温度计代表什么生肖|
虚胖是什么意思|
脸颊两侧长痘痘什么原因|
十月二十三号是什么星座|
高血糖吃什么降得快|
全能神是什么|
肚子痛拉稀吃什么药|
吃什么能让胸变大|
昕字取名什么寓意|
眼前发黑是什么原因|
男人有霉菌是什么症状|
肠子长息肉有什么症状|
有恙是什么意思|
什么一刻值千金花有清香月有阴|
甲功不正常有什么表现|
黄精为什么要九蒸九晒|
维生素b5又叫什么|
心功能三级是什么意思|
肠系膜淋巴结肿大吃什么药|
软是什么意思|
atp是什么意思|
梦见自己会开车了是什么意思|
二月什么座|
两胸中间疼是什么原因|
吃什么疏通血管|
眼睛肿了用什么药|
英国全称是什么|
女人养颜抗衰老吃什么最好|
过年是什么时候|
盆腔积液是什么原因引起的|
五月十四号是什么情人节|
什么是uv|
生吃洋葱有什么好处|
吸氧有什么好处|
淋巴吃什么药好|
左枕前位是什么意思|
望远镜什么牌子好|
猪红是什么|
下午三点到五点是什么时辰|
缺钾吃什么食物好|
吃大米配什么菜|
百合病是什么病|
音乐制作人是干什么的|
风湿类风湿有什么区别|
窦性心律电轴右偏什么意思|
一个火一个斤念什么|
头发一把一把的掉是什么原因|
胩是什么意思|
人的五官指什么|
狗狗吃胡萝卜有什么好处|
孩子贫血吃什么补血最快|
路痴是什么原因造成的|
老年人尿血是什么原因|
肺结节钙化是什么意思|
三点水加个及念什么|
梦到蛇是什么意思周公解梦|
钧字五行属什么|
宝宝乳糖不耐受喝什么奶粉比较好|
3.28是什么星座|
月经老是提前是什么原因|
姓郑的男孩取什么名字好|
女性手麻是什么原因|
gem是什么意思|
韦编三绝什么意思|
淋雨了喝什么驱寒|
imf是什么意思|
梦见挖土豆是什么意思|
脸上过敏是什么症状|
d二聚体高是什么原因|
比目鱼是什么鱼|
肠道菌群失调有什么症状|
灌肤是什么意思|
开塞露的成分是什么|
正常人为什么传导阻滞|
右手臂发麻是什么原因|
全科门诊主要看什么|
念旧的人是什么样的人|
丙球是什么|
autumn什么意思|
脱口秀是什么|
记性不好吃什么药|
光感是什么意思|
脚底发麻是什么原因|
什么是菩提心|
oioi是什么牌子|
诸葛亮长什么样|
兔死什么悲|
感染hpv吃什么药|
看脑部挂什么科|
突然尿频是什么原因|
拉肚子什么原因造成的|
中水是什么意思|
月经过后有褐色分泌物是什么原因|
大四什么时候毕业|
白带像豆腐渣用什么药|
检查怀孕挂什么科|
地瓜什么时候成熟|
苍苍什么|
负离子有什么作用|
脾囊肿是什么病严重吗|
饭中吃药是什么时候吃|
哺乳期吃避孕药对孩子有什么影响|
费气肿要吃什么药|
扁平比是什么意思|
牛油果树长什么样|
拔得头筹是什么意思|
复山是什么意思|
大便干吃什么药|
唐氏儿是什么意思|
一个日一个处一个口念什么|
什么功高|
创伤弧菌用什么抗生素|
头疼恶心想吐是什么原因|
一直发低烧是什么原因|
什么的兵马俑|
who是什么组织|
胎梦梦见蛇是什么意思|
什么东西不导电|
一什么蛇|
卵泡是什么东西|
休学需要什么条件|
皮试阳性是什么意思|
姜枣茶什么时间喝最好|
什么叫压缩性骨折|
梦见死猪是什么意思|
夏天是什么样的|
酮症酸中毒什么原因引起的|
固体玉米糖浆是什么|
鳏寡孤独是什么意思|
10月9号是什么星座|
带状疱疹不能吃什么东西|
跖疣念什么字|
甘油三酯高是什么意思|
血压偏低有什么危害|
什么的小姑娘|
痔疮手术后可以吃什么|
鲁迅原名什么|
脑梗输什么液效果最好|
病入膏肓是什么意思|
湿热吃什么中药|
乙肝肝炎表面抗体阳性是什么意思|
香港身份证有什么好处|
乐果是什么农药|
淋球菌是什么病|
感冒头疼是什么原因|
心烦意乱是什么意思|
薏米和什么一起煮粥最好|
睾丸皮痒用什么药|
y什么意思|
什么是信念|
20度穿什么衣服合适|
结婚十周年是什么婚|
鸭子喜欢吃什么|
灵泛是什么意思|
精虫上脑什么意思|
肠系膜淋巴结炎吃什么药|
重阳节又称什么节|
碳酸钙d3颗粒什么时候吃最好|
幻听是什么原因|
大惊小怪是什么意思|
感光度是什么意思|
补肾吃什么|
油菜花是什么颜色|
长期便秘吃什么药好|
跳蚤的天敌是什么|
受精卵着床有什么感觉|
舌根起泡是什么原因|
什么的雪人|
惹上官司是犯了什么煞|
养老保险什么时候开始交|
狮子住在什么地方|
百叶是什么|
什么东西越生气越大|
6月22日什么星座|
腺癌是什么原因引起的|
颈椎痛看什么科|
萌是什么意思|
epc什么意思|
皮肤过敏擦什么药膏好得快|
脚踝发黑是什么原因|
疱疹是什么原因长的|
梦见和老公吵架是什么预兆|
高考300分能上什么大学|
做小吃什么生意最赚钱|
炭疽病用什么农药最好|
百度
车讯:1.8T/2.0T动力 国产斯柯达柯迪亚克官图
Learn it once, use it many times
You learn a natural language once and use it many times. The lesson
for a language designer is that a language should be optimized for
expressive power rather than for ease of learning. It's easy to
learn to drive a golf cart, but it's hard to express yourself in
one.
Learn as you go
You don't learn a natural language even once, in the sense that you
never stop learning it. Nobody has ever learned any natural
language completely. Unfortunately, in the interests of
orthogonality, many computer languages are designed so that every
degree of freedom (dimension) is available everywhere. This has
its good points if you understand the whole language, but can lead
to confusion if you don't. You'd like to ignore some of the
dimensions to begin with. You'd like to be able to talk baby talk
and be understood. It's okay if a language is difficult to learn,
as long as you don't have to learn it all at once.
Many acceptable levels of competence
This is more of a sociological feature, compared to ``learn as you
go'', which is a psychological feature. People don't mind if you
speak a subset of a natural language, especially if you are a child
or a foreigner. (Except in Paris, of course.) If a language is
designed so that you can ``learn as you go'', then the expectation is
that everyone is learning, and that's okay.
Multiple ways to say the same thing
This one is more of an anthropological feature. People not
only learn as they go, but come from different backgrounds,
and will learn a different subset of the language first. It's
Officially Okay in the Perl realm to program in the subset of
Perl corresponding to sed, or awk, or C, or shell, or BASIC, or
Lisp, or Python. Or FORTRAN, even. Just because Perl is the
melting pot of computer languages doesn't mean you have to stir.
No shame in borrowing
In English (and other languages not suffering an identity crisis),
people don't mind swiping ideas from other languages and making
them part of the language. Efforts to maintain the ``purity'' of a
language (whether natural or artificial) only succeed in
establishing an elite class of people who know the shibboleths.
Ordinary folks know better, even if they don't know what
``shibboleth'' means.
Indeterminate dimensionality
Scientists like to be able to locate things by giving a ``vector'',
that is, a list of coordinates in a space of known dimensionality.
This is one of the reasons they like orthogonality--it means the
various components of the vector are independent of each other.
Unfortunately, the real world is not usually set up to work that
way. Most problems, including linguistics problems, are a matter
of ``getting from here to there'', and the geography in-between has a
heavy influence on which solutions are practical. Problems tend to
be solved at several levels. A typical journey might involve your
legs, your car, an escalator, a moving sidewalk, a jet, maybe some
more moving sidewalks or a tram, another jet, a taxi, and an
elevator. At each of these levels, there aren't many ``right
angles'', and the whole thing is a bit fractal in nature. In terms
of language, you say something that gets close to what you want to
say, and then you start refining it around the edges, just as you
would first plan your itinerary between major airports, and only
later worry about how to get to and from the airport.
Local ambiguity is okay
People thrive on ambiguity, as long as it is quickly resolved.
Generally, within a natural language, ambiguity is resolved rapidly
using recently spoken words and topics. Pronouns like ``it'' refer
to things that are close by, syntactically speaking. Perl is full
of little ambiguities that people never even notice because they're
resolved so rapidly. For instance, many terms and operators in
Perl begin with identical characters. Perl resolves them based on
whether it's expecting to see a term or an operator, just as a
person would. If you say 1 & 2
, it knows that the &
is a bitwise
AND, but if you say &foo
, it knows that you're calling subroutine
``foo''.
百度 从五四到当今,从大陆到两岸三地,从农村到城市,从中国到世界。
In contrast, many strongly typed languages have ``distant''
ambiguity. C++ is one of the worst in this respect, because you
can look at a + b and have no idea at all what the + is doing, let
alone where it's defined. We send people to graduate school to
learn to resolve distant ambiguities.
Punctuation by prosody and inflection
Natural language is naturally punctuated by the pitches, stresses
and pauses we use to indicate how words are related. So-called
``body language'' also comes into play here. Some of this
punctuation is written in English, but much of it is not--or is
only approximated. The trend in recent electronic communications
has been to invent various forms of punctuation. :-)
Some computer language designers seem to think that punctuation is
evil; I doubt their English teachers would agree.
Disambiguation by number, case and word order
Part of the reason a language can get away with certain local
ambiguities is that other ambiguities are suppressed by various
mechanisms. English uses number and word order, with vestiges of a
case system in the pronouns: ``The man looked at the men, and they
looked back at him.'' It's perfectly clear in that sentence who is
doing what to whom. Similarly, Perl has number markers on its
nouns; that is, $dog
is one pooch, and @dog
is (potentially) many.
So $
and @
are a little like ``this'' and ``these'' in English. Perl
also uses word order: ``sub use
'' means something quite different
from ``use sub
''. Perl doesn't do much with case distinctions,
unlike the shells, which make use-vs-mention distinctions using a $
prefix. Though I guess if you allow that, you could count Perl
quotes as a form of case marker. On a slightly more abstruse
level, Perl 5's \
operator is a sort of case marker or preposition
indicating mention rather than use. But as with most computer
languages, prepositional notions are usually expressed by position
within an argument list. (Though it's certainly possible to
write calls using named parameters in Perl, and keys of hashes
sometimes function as prepositions.)
move $rook from => $qr_pos, to => "kb3";
Topicalization
With regard to topicalization, I should point out that this
sentence starts with one. A topicalizer simply introduces the
subject you're intending to talk about. There are several
syntactic forms in English, the simplest one of which is simply a
noun: ``Carrots, I hate 'em.'' Pascal has a ``with'' clause that
functions as a topicalizer. Topicalizers can sometimes give a list
of topics, at which point you see words like ``for BLAH and BLAH, do
BLAH''. In Perl, there are various things that work as topicalizers.
You can say
foreach (@dog) { print $_ }
This can even be used singularly:
for ($some_long_name) { s/foo/bar/g; tr/a-z/A-Z/; print; }
Pattern matches (and indeed any conditionals) tend to function as
topicalizers in Perl:
/^Subject: (.*)/ and print $1;
Discourse structure
Discourse structure is how an utterance longer than a sentence is
put together. Different languages and cultures have different
rules for how to tell a joke or a story, for instance, or how to
write a book about Perl. Some computer languages have rather fixed
rules for larger structures. COBOL and Pascal come to mind. Perl
tends to be pretty free about what order you put your statements,
except that it's rather Aristotelian in requiring you to provide
an explicit beginning and end for larger structures, using curlies.
But you could almost claim that #!/usr/bin/perl
corresponds to
``Once upon a time'', while __END__
means ``And they lived happily
ever after.''
Pronominalization
We all know about pronouns and their uses. There are a number of
pronouns in Perl: $_
means ``it'', and @_
tends to mean ``them''. (But
$1
, $2
etc. are also pronominal references back to antecedent
substrings in the last pattern match, which we mentioned can function
as topicalizers.) Within a foreach loop or a grep, $_
is not just
a copy of the item in question, but an alias for it. Similarly, @_
is a list of references to the function's arguments, and the
arguments can be modified by changing elements of @_
.
No theoretical axes to grind
Natural languages are used by people who for the most part don't
give a rip how elegant the design of their language is. Except for
a few writers striving to make a point in the most efficient way
possible, ordinary folks scatter all sorts of redundancy throughout
their communication to make sure of being understood. They use
whatever words come to hand to get their point across, and work at
it till they beat the thing to death. Normally this ain't a
problem. They're quite willing to learn a new word occasionally if
they see that it will be useful, but unlike lawyers or computer
scientists, they feel little need to define lots of new words
before they say what they want to say.
In terms of computer languages, this argues for predefining the
commonly used concepts so that people don't feel the need to make
so many definitions. Quite a few Perl scripts contain no
definitions at all. I dare you to find a C++ program without a
definition.
Style not enforced except by peer pressure
We do not all have to write like Faulkner, or program like
Dijkstra. I will gladly tell people what my programming style is,
and I will even tell them where I think their own style is unclear
or makes me jump through mental hoops. But I do this as a fellow
programmer, not as the Perl god. Some language designers hope to
enforce style through various typographical means such as forcing
(more or less) one statement per line. This is all very well for
poetry, but I don't think I want to force everyone to write poetry
in Perl. Such stylistic limits should be self-imposed, or at most
policed by consensus among your buddies.
Cooperative design
Nobody designs a natural language by themselves, unless their name
happens to be Tolkien. We all contribute to the design of our
language by our borrowing and our coinages, by copying what we
think is cool and eschewing what we think is obfuscational. The
best artificial languages are collaborations--even with a language
like Perl where one person seems to be in charge of it. Most of
Perl's good ideas were not original with me. Some of them came
from other languages, and some of them were suggestions made by
various folks as we went along. If you consider the language to
include the various cultural trappings (libraries, bin directories)
that go along with the language, then even languages like C, or
Ada, or C++, or even the Unix shells are collaborations by many,
many people. Perl is no exception to this.
``Inevitable'' Divergence
Because a language is designed by many people, any language
inevitably diverges into dialects. It may be possible to delay
this, but for any living language the forces of divergence are
nearly always stronger then the forces of convergence. POSIX tried
to unify System V and BSD, and as soon as they squeezed things
together in that dimension, the number of Unix variants exploded in
several other dimensions. The lesson for a language designer is to
build in explicit mechanisms so that it's easy to identify which
variant of the language is being dealt with. Perl 5 has an
explicit extension mechanism for which you specify, using ``use''
clauses, which kinds of special semantics or ``dialects'' you're
going to be relying on. Perl 4 didn't have this, and there was
considerably more pressure to put various things into the language
that didn't belong in the core language. Hopefully now we can
stabilize ``basic'' Perl so that there is less need to invent
oraperl, sybperl, isqlperl, etc.
尿胆原norm是什么意思hcv8jop1ns1r.cn |
孩子出疹子应该注意什么hcv8jop5ns2r.cn |
南辕北辙是什么意思hcv8jop2ns1r.cn |
ats是什么意思96micro.com |
毒鸡汤是什么意思hcv9jop5ns0r.cn |
什么布料最好xscnpatent.com |
办幼儿园需要什么证hcv8jop8ns9r.cn |
反胃想吐吃什么药wuhaiwuya.com |
月经来了不走是什么原因hcv8jop8ns3r.cn |
两千年前是什么朝代hcv8jop7ns2r.cn |
肉身成圣是什么意思hcv9jop5ns2r.cn |
云南什么族hcv8jop8ns0r.cn |
少字五行属什么hcv8jop0ns8r.cn |
咳嗽恶心干呕是什么原因引起的hcv7jop7ns4r.cn |
腰间盘突出是什么原因引起的hcv8jop5ns0r.cn |
下午头晕是什么原因引起的hcv9jop6ns1r.cn |
唾液酸是什么hebeidezhi.com |
看肾挂什么科hcv8jop4ns1r.cn |
父亲节送什么花hcv7jop7ns0r.cn |
真菌涂片检查是查什么0297y7.com |
百度