![]() |
|
Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
{from an alt.perl post I just made, reposted here to solicit feedback from fellow monks...}
Perl is extremely difficult to parse. In fact, some would say impossible. One thing that makes it difficult is the dual nature of a half dozen characters like "/". If that / is being used in a place that's expecting an operator, it's divide. If it's being used in a place that's expecting an operand, it's the beginning of a regular expression. So you have to keep track at all times of whether you're looking for an operator or an operand. "No problem", you say? Quick... for the following, play the game of "regex or divide?" Got those right? How about these? OK, and now some of your own: Got those too? How about these (same problem, different file): A little harder, eh? So now you have to parse OUTSIDE the file to get your answer. And as if that wasn't enough, let's get weird: Quick, was that last one a divide or a regex start? Why does it matter? Look at this: The first one is computing the sin of the true/false value gotten by matching " 25 ; # " against $_. Then it dies. The second one is computing the time of day divided by 25, then ignoring the comment. Starting to see the trouble? This leads people to say "the only thing which can parse Perl (the language) is perl (the binary)". Maybe not for Perl6. But for the Perl we know and can use today, certainly so. -- Randal L. Schwartz, Perl hacker In reply to On Parsing Perl by merlyn
|
|
吃什么去胃火口臭 | 7是什么意思 | 有龙则灵的灵是什么意思 | 来曲唑片什么时候吃最好 | 转氨酶偏高是什么原因引起的 |
口加一笔变成什么字 | 导览是什么意思 | 内向的人适合什么工作 | 上热下寒吃什么药 | 水疗是什么意思 |
72年是什么年 | 得偿所愿什么意思 | 臭鼬是什么动物 | 靶子是什么意思 | 菠菜什么时候传入中国 |
舌头发白是什么情况 | 传教士是什么意思 | 7月八号是什么星座 | 幡然醒悟是什么意思 | 5月12是什么星座 |
胆固醇高不能吃什么hcv8jop3ns2r.cn | 梦到买房子是什么意思hcv7jop5ns2r.cn | 龙虾喜欢吃什么hcv8jop9ns7r.cn | nt检查是什么hcv7jop4ns6r.cn | 尿路感染是什么原因hcv9jop1ns4r.cn |
同甘共苦什么意思hcv7jop6ns7r.cn | 尿是绿色的是什么原因hcv7jop9ns9r.cn | 血小板低是什么引起的hcv7jop9ns9r.cn | 维生素是什么hcv9jop2ns7r.cn | 什么魂什么魄hcv8jop1ns0r.cn |
什么的鼓励hcv8jop5ns3r.cn | 茴三硫片主治什么xinmaowt.com | 人生没有什么不可放下hcv9jop0ns1r.cn | 心衰是什么病hcv7jop9ns5r.cn | 银杏叶是什么颜色hcv9jop2ns3r.cn |
苯三酚注射有什么用mmeoe.com | 不知道为了什么520myf.com | 吃炒黑豆有什么好处和坏处gysmod.com | 水光针是什么hcv8jop5ns5r.cn | 狗狗为什么会得细小hcv8jop2ns9r.cn |