s*****w 发帖数: 1527 | |
D*******a 发帖数: 3688 | 2 perl is very unreadable. bad for engineering. python is a bit better.
I hate to maintain someone else's perl script.
【在 s*****w 的大作中提到】 : perl还是我的最爱
|
t****t 发帖数: 6806 | 3 perl is not meant to be manageable. it is designed for quick and dirty.
【在 D*******a 的大作中提到】 : perl is very unreadable. bad for engineering. python is a bit better. : I hate to maintain someone else's perl script.
|
D*******a 发帖数: 3688 | 4 问题是很多时候,东西quick & dirty地做完了之后,就这么留下了。没啥人有那个功
夫去refactor或者重写,反正谁接手谁遭殃。所以还不如一开始就用一个可读性更强的
玩意。
再说了,很多时候写script未必就一定比java/c#这种编译型快速开发的语言快。其中
一个原因就是调试麻烦,而且容易出bug。
【在 t****t 的大作中提到】 : perl is not meant to be manageable. it is designed for quick and dirty.
|
t****t 发帖数: 6806 | 5 it is not designed to be refactored or maintained or rewritten or readable.
【在 D*******a 的大作中提到】 : 问题是很多时候,东西quick & dirty地做完了之后,就这么留下了。没啥人有那个功 : 夫去refactor或者重写,反正谁接手谁遭殃。所以还不如一开始就用一个可读性更强的 : 玩意。 : 再说了,很多时候写script未必就一定比java/c#这种编译型快速开发的语言快。其中 : 一个原因就是调试麻烦,而且容易出bug。
|
D*******a 发帖数: 3688 | 6 那为啥还有存在的必要呢,如果连quick and dirty都被别的语言比过了。
【在 t****t 的大作中提到】 : it is not designed to be refactored or maintained or rewritten or readable.
|
t****t 发帖数: 6806 | 7 you also said perl is only "未必比别的快", so most likely, at least
sometimes, it is faster than other languages.
as a side note, i think every major language has its own point. you don't
have to like it, you don't have to use it, but you have to respect it.
【在 D*******a 的大作中提到】 : 那为啥还有存在的必要呢,如果连quick and dirty都被别的语言比过了。
|
D*******a 发帖数: 3688 | 8 我同意,不过技术总是向前发展,什么语言都会被更新更好的语言取代,顶替。
如果有更好的,为啥不用呢?
【在 t****t 的大作中提到】 : you also said perl is only "未必比别的快", so most likely, at least : sometimes, it is faster than other languages. : as a side note, i think every major language has its own point. you don't : have to like it, you don't have to use it, but you have to respect it.
|
t****t 发帖数: 6806 | 9 has anyone designed anything to replace perl yet?
(obviously python can't.)
【在 D*******a 的大作中提到】 : 我同意,不过技术总是向前发展,什么语言都会被更新更好的语言取代,顶替。 : 如果有更好的,为啥不用呢?
|
N***m 发帖数: 4460 | 10 你的回复太冷酷太无情了,哈哈哈
【在 t****t 的大作中提到】 : has anyone designed anything to replace perl yet? : (obviously python can't.)
|
|
|
g****y 发帖数: 436 | 11 深有同感,但是java这个东西感觉很累赘,特别是routine的文本文件扫描,parsing,
tokenize这些工作,文件稍微一大就慢得不行。
【在 D*******a 的大作中提到】 : 问题是很多时候,东西quick & dirty地做完了之后,就这么留下了。没啥人有那个功 : 夫去refactor或者重写,反正谁接手谁遭殃。所以还不如一开始就用一个可读性更强的 : 玩意。 : 再说了,很多时候写script未必就一定比java/c#这种编译型快速开发的语言快。其中 : 一个原因就是调试麻烦,而且容易出bug。
|
D*******a 发帖数: 3688 | 12 C#/LINQ相当好用,试试?
【在 g****y 的大作中提到】 : 深有同感,但是java这个东西感觉很累赘,特别是routine的文本文件扫描,parsing, : tokenize这些工作,文件稍微一大就慢得不行。
|
d****p 发帖数: 685 | 13 光regex其他编译型语言就无法替代脚本语言. |
g**e 发帖数: 6127 | 14 perl能做的,php基本上也可以
【在 d****p 的大作中提到】 : 光regex其他编译型语言就无法替代脚本语言.
|
g****y 发帖数: 436 | 15 C#不是很了解,比java快吗?特别是FILE IO? 看了一下,感觉语法用起来和java很类
似,呵呵。
【在 D*******a 的大作中提到】 : C#/LINQ相当好用,试试?
|
n*w 发帖数: 3393 | 16 展开说说?
知道有一些公司几年前就开始了python换掉perl的过程。
【在 t****t 的大作中提到】 : has anyone designed anything to replace perl yet? : (obviously python can't.)
|
d****p 发帖数: 685 | 17 当然他们都是脚本语言.
事实上还是有微小的区别.
还是拿regex来说,如果你经常用vi,你就会更喜欢perl一些.
【在 g**e 的大作中提到】 : perl能做的,php基本上也可以
|
t****t 发帖数: 6806 | 18 i am not very familiar with python, but one example is the lacking of string
interpolation. the other example is the execution speed -- while perl is
not super fast, python is even slower. (you don't have to take out your old
example; i still remember it. i am not claiming python is always slower than
perl, but in most cases it is.)
of course, things like string interpolation and built-in regex are all
synatx sugars; but perl is full of syntax sugars which makes it unique.
【在 n*w 的大作中提到】 : 展开说说? : 知道有一些公司几年前就开始了python换掉perl的过程。
|
s*****w 发帖数: 1527 | 19 i used both, still like perl.
it's precise and efficient.
string
perl is
your old
slower than
all
unique.
【在 t****t 的大作中提到】 : i am not very familiar with python, but one example is the lacking of string : interpolation. the other example is the execution speed -- while perl is : not super fast, python is even slower. (you don't have to take out your old : example; i still remember it. i am not claiming python is always slower than : perl, but in most cases it is.) : of course, things like string interpolation and built-in regex are all : synatx sugars; but perl is full of syntax sugars which makes it unique.
|
n*w 发帖数: 3393 | 20 我曾把两个perl小程序改用python重写过。python的速度是perl的几倍。可能是python
有编译一下的原因。这两个程序的string interpolation不是太复杂。
string
old
than
【在 t****t 的大作中提到】 : i am not very familiar with python, but one example is the lacking of string : interpolation. the other example is the execution speed -- while perl is : not super fast, python is even slower. (you don't have to take out your old : example; i still remember it. i am not claiming python is always slower than : perl, but in most cases it is.) : of course, things like string interpolation and built-in regex are all : synatx sugars; but perl is full of syntax sugars which makes it unique.
|
|
|
t****t 发帖数: 6806 | 21 well i said i am not familiar with python. the conclusion is just my
impression (i.e. from my reading on web). definitely python itself is
developing, so my impression could be wrong or outdated. on the other hand,
your example is not very convincing (to me) since i also remember you didn't
write very good perl script in your old example, when we fixed a few points
(such as using my in iteration) the speed bumped up as well. so probably
you can show me some convincing 3rd party benchmarks?
pyth
【在 n*w 的大作中提到】 : 我曾把两个perl小程序改用python重写过。python的速度是perl的几倍。可能是python : 有编译一下的原因。这两个程序的string interpolation不是太复杂。 : : string : old : than
|
T*******i 发帖数: 4992 | 22 巨蟒和骆驼的战争居然还存在?这个应该没啥可争的了吧。
两个事实:
1.众多业界大佬(比如ER, BE)已经endorse了大蛇
2.业界巨头喜欢大蛇,比如在google,大蛇是三个official languages之一。
当然,要看你用script干啥了。
【在 s*****w 的大作中提到】 : perl还是我的最爱
|
n*w 发帖数: 3393 | 23 yes, i remember my old post.later i found that the perl is much faster
because the modified perl version only process 10-20% of the dataset while
the python one was processing the whole dataset. it's quite powerful that
perl can mix regex and perl functions.
,
't
points
【在 t****t 的大作中提到】 : well i said i am not familiar with python. the conclusion is just my : impression (i.e. from my reading on web). definitely python itself is : developing, so my impression could be wrong or outdated. on the other hand, : your example is not very convincing (to me) since i also remember you didn't : write very good perl script in your old example, when we fixed a few points : (such as using my in iteration) the speed bumped up as well. so probably : you can show me some convincing 3rd party benchmarks? : : pyth
|
t****t 发帖数: 6806 | 24 huh? you mean perl is faster because it is only processing partial data?
shouldn't it mean python is faster?
【在 n*w 的大作中提到】 : yes, i remember my old post.later i found that the perl is much faster : because the modified perl version only process 10-20% of the dataset while : the python one was processing the whole dataset. it's quite powerful that : perl can mix regex and perl functions. : : , : 't : points
|
t****t 发帖数: 6806 | 25 why should there be a war between perl and python? IMHO they are designed
for different purposes.
【在 T*******i 的大作中提到】 : 巨蟒和骆驼的战争居然还存在?这个应该没啥可争的了吧。 : 两个事实: : 1.众多业界大佬(比如ER, BE)已经endorse了大蛇 : 2.业界巨头喜欢大蛇,比如在google,大蛇是三个official languages之一。 : 当然,要看你用script干啥了。
|
T*******i 发帖数: 4992 | 26 争论还是有的,比较是经常的事,就跟vim vs emacs一样
不过已经是历史了
【在 t****t 的大作中提到】 : why should there be a war between perl and python? IMHO they are designed : for different purposes.
|
X****r 发帖数: 3557 | 27 Exactly. Picking the best tool for the job. It is meaningless to arguing
on which is the best tool without specifying what the job is.
designed
【在 t****t 的大作中提到】 : why should there be a war between perl and python? IMHO they are designed : for different purposes.
|
c********e 发帖数: 383 | 28 人的时间精力有限啊。学计算机语言很伤脑细胞好不好。
大部分搞编程的就是混口饭吃,还不到专业大厨的水平,万镬大同,平底锅还是高压锅
还是很大区别的, 用高压锅炒菜对很多没时间试验炒锅的人来说很多时候也是个办法
,当然在中国菜大厨的眼里还是很不象话的。最后,这个世界懒人居多,大部分人还是
像吃现成的,但是被迫当了厨子。悲哀 |
s*****w 发帖数: 1527 | 29 well, want to know the trend.
have a family to support, so much pressure, what else can u do ?
【在 c********e 的大作中提到】 : 人的时间精力有限啊。学计算机语言很伤脑细胞好不好。 : 大部分搞编程的就是混口饭吃,还不到专业大厨的水平,万镬大同,平底锅还是高压锅 : 还是很大区别的, 用高压锅炒菜对很多没时间试验炒锅的人来说很多时候也是个办法 : ,当然在中国菜大厨的眼里还是很不象话的。最后,这个世界懒人居多,大部分人还是 : 像吃现成的,但是被迫当了厨子。悲哀
|
l******e 发帖数: 12192 | 30 话不能这么说
现在谁还学cobol?呵呵
【在 X****r 的大作中提到】 : Exactly. Picking the best tool for the job. It is meaningless to arguing : on which is the best tool without specifying what the job is. : : designed
|
|
|
t****t 发帖数: 6806 | 31 if your job *requires* you to learn cobol, then you will. you think nobody
learns it? my brother-in-law do it for a living. it pays well and it is
quite stable.
programmers as a hobit, probably won't touch it. programmers as a job,
probably won't have a choice. programmers looking for a job may have a
choice, but it's difficult to swing between choices too.
however for advanced programmers, learning another language isn't a big
problem anyway.
【在 l******e 的大作中提到】 : 话不能这么说 : 现在谁还学cobol?呵呵
|
t****t 发帖数: 6806 | |
l******e 发帖数: 12192 | 33 所以我不说谁“用”(cobol现在肯定有人用),而是说谁“学”。现在不是被要求,估
计是没啥人学了。
如果一个人在问,用\学哪种比较好,多半不是被*required*。
另外,找工作的程序员要swing并不难。
最后,对于高级程序员来说,自己学哪种语言当然不是难事。但是,给新人指点,给产
品定方向这些时候,很多高级程序员往往习惯固守自己曾经学过、用过的语言、工具。
【在 t****t 的大作中提到】 : if your job *requires* you to learn cobol, then you will. you think nobody : learns it? my brother-in-law do it for a living. it pays well and it is : quite stable. : programmers as a hobit, probably won't touch it. programmers as a job, : probably won't have a choice. programmers looking for a job may have a : choice, but it's difficult to swing between choices too. : however for advanced programmers, learning another language isn't a big : problem anyway.
|
g*****g 发帖数: 34805 | 34 入门级啥都行,老年程序员不都得要求个5年经验的。
没有就是没有,编不来的。所以关注一下业界动态
还是很有必要的,想跳最好还是一种语言刚火,大家
都是菜鸟的时候。
,估
【在 l******e 的大作中提到】 : 所以我不说谁“用”(cobol现在肯定有人用),而是说谁“学”。现在不是被要求,估 : 计是没啥人学了。 : 如果一个人在问,用\学哪种比较好,多半不是被*required*。 : 另外,找工作的程序员要swing并不难。 : 最后,对于高级程序员来说,自己学哪种语言当然不是难事。但是,给新人指点,给产 : 品定方向这些时候,很多高级程序员往往习惯固守自己曾经学过、用过的语言、工具。
|
y****e 发帖数: 23939 | 35 Python 和 Ruby 更好吧,支持面象对象
【在 s*****w 的大作中提到】 : perl还是我的最爱
|
s*****w 发帖数: 1527 | 36 thought u have object oriented perl
【在 y****e 的大作中提到】 : Python 和 Ruby 更好吧,支持面象对象
|
m*****k 发帖数: 1864 | |
k*******d 发帖数: 1340 | 38 好像现在招聘广告上要perl的更多一点,我还是更喜欢python,看到perl的code头就爆
,没有心去学 |
b******n 发帖数: 592 | 39 python,最近买白菜也要用python。。
桌上摆了本ruby,发现很多语法很怪异。。
script还没有哪个什么都能做。
【在 s*****w 的大作中提到】 : perl还是我的最爱
|
b******n 发帖数: 592 | 40 为什么都这么讲,写的好的也容易读吧。
以前公司同事老抱怨C中
a = b > c ? d : e;
读不懂
python也可以写的很烂。我发现英文好不好是写程序的关键,变量名字,函数名称都不
好起
【在 D*******a 的大作中提到】 : perl is very unreadable. bad for engineering. python is a bit better. : I hate to maintain someone else's perl script.
|
|
|
b******n 发帖数: 592 | 41 处理文本的话我还一直用perl,速度不一定比sed快,但是比sed好用;
有时候一行反而比很多函数,很多object好看。当然,要是不懂perl的话有些就看不懂了
其实维护别人的代码任何时候都不如自己的顺手,以前的公司从c,抱怨到perl,只要
开发的人不在了,如果没有完善的文档,肯定麻烦
【在 t****t 的大作中提到】 : you also said perl is only "未必比别的快", so most likely, at least : sometimes, it is faster than other languages. : as a side note, i think every major language has its own point. you don't : have to like it, you don't have to use it, but you have to respect it.
|
b******n 发帖数: 592 | 42 其实用到了script,速度就已经不是关键了。python最主要也是用来调用其它软件包,
比如科学计算的话,这个跟perl一样。perl更接近unix一些,python就完全脱离了
shell的传统,比如perl里面``,如果在python里面就不是一行解决的问题了。
python可能更符合对语言的要求,perl如果你有unix背景,就发现很多东西很方便。有
点vim跟emacs的意思
,
't
points
【在 t****t 的大作中提到】 : well i said i am not familiar with python. the conclusion is just my : impression (i.e. from my reading on web). definitely python itself is : developing, so my impression could be wrong or outdated. on the other hand, : your example is not very convincing (to me) since i also remember you didn't : write very good perl script in your old example, when we fixed a few points : (such as using my in iteration) the speed bumped up as well. so probably : you can show me some convincing 3rd party benchmarks? : : pyth
|
r****t 发帖数: 10904 | 43 其实 perldoc 还不错,虽然 python 的 doctest 还是更好一些。
懂了
【在 b******n 的大作中提到】 : 处理文本的话我还一直用perl,速度不一定比sed快,但是比sed好用; : 有时候一行反而比很多函数,很多object好看。当然,要是不懂perl的话有些就看不懂了 : 其实维护别人的代码任何时候都不如自己的顺手,以前的公司从c,抱怨到perl,只要 : 开发的人不在了,如果没有完善的文档,肯定麻烦
|
k***e 发帖数: 7933 | 44 c#里面regex早就不比perl等弱了,而且有perl等没有的一些功能。
【在 d****p 的大作中提到】 : 光regex其他编译型语言就无法替代脚本语言.
|
c**t 发帖数: 2744 | 45 f#, power shell
【在 s*****w 的大作中提到】 : perl还是我的最爱
|