Enough already! (Eu vs Perl)
- Posted by Mike Hurley <mikehurley2 at NETZERO.COM> Dec 09, 1999
- 364 views
------=_NextPart_000_0021_01BF426C.2F929520 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I think those of us who've actually read all or most of the Eu vs Perl = posts are getting tired of hearing about them...but I think before I = tell everybody to knock it off, I should put my mind's worth in. 1) If you want a string type, just declare a string type, it isn't all = that difficult and doesn't slow the machine down that much (I guess that = would depend on if its coming from the comp's perspective or yours...) = I know it would be a very simple thing to do, but here's something that = could work. constant MIN_ASCII_VALUE=3D'0' --set the minimum ASCII value for a = string constant MAX_ASCII_VALUE=3D'z' --set the maximum ASCII value for a = string global type string(object x) --make error handling a tiny bit easier if not sequence(x) then return 0 end if if equal("",x) then return 1 end if --empty strings are OK for i=3D1 to length(x) do if sequence(x[i]) then return 0 end if if not x[i]>=3DMIN_ASCII_VALUE or not x[i]<=3DMAX_ASCII_VALUE then = return 0 end if end for return 1 end type --gee, wasn't that hard... I realize I may be missing the point, but trust me, that isn't something = new :P ! 2) I don't understand how Mr. Wall could call Perl code "readable." To = me, Perl looks worse than the C family, which I think look like a text = editor with the flu. Also, in some of the debating that was going on, = Mr. Wall seemed to think that benchmarks aren't a good way to tell if a = program went fast or slow or somewhere in between. If benchmarks aren't = the way to tell, what would be? Ok, I've said what I wanted to say. Now please, think of my message as a rhetorical one, and drop the Eu vs = Perl (unless you would like to tell me I have no idea of what I'm = talking about, which I wouldn't be surprised.) Mike Hurley ------=_NextPart_000_0021_01BF426C.2F929520 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2>I think those of us who've actually read all or most = of the Eu=20 vs Perl posts are getting tired of hearing about them...but I think = before I=20 tell everybody to knock it off, I should put my mind's worth = in.</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>1) If you want a string type, just declare a string = type, it=20 isn't all that difficult and doesn't slow the machine down that much (I = guess=20 that would depend on if its coming from the comp's perspective or=20 yours...) I know it would be a very simple thing to do, but here's = something that could work.</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>constant MIN_ASCII_VALUE=3D'0' --set the minimum = ASCII value for=20 a string</FONT></DIV> <DIV><FONT size=3D2>constant MAX_ASCII_VALUE=3D'z' --set the maximum = ASCII value for=20 a string</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>global type string(object x) --make error handling a = tiny bit=20 easier</FONT></DIV> <DIV><FONT size=3D2>if not sequence(x) then return 0 end if</FONT></DIV> <DIV><FONT size=3D2>if equal("",x) then return 1 end if --empty strings = are=20 OK</FONT></DIV> <DIV><FONT size=3D2>for i=3D1 to length(x) do</FONT></DIV> <DIV><FONT size=3D2> if sequence(x[i]) then return 0 = end=20 if</FONT></DIV> <DIV><FONT size=3D2> if not x[i]>=3DMIN_ASCII_VALUE = or not=20 x[i]<=3DMAX_ASCII_VALUE then return 0 end if</FONT></DIV> <DIV><FONT size=3D2>end for</FONT></DIV> <DIV><FONT size=3D2>return 1</FONT></DIV> <DIV><FONT size=3D2>end type --gee, wasn't that hard...</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>I realize I may be missing the point, but trust me, = that isn't=20 something new :P !</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>2) I don't understand how Mr. Wall could call Perl = code=20 "readable." To me, Perl looks worse than the C family, which I = think look=20 like a text editor with the flu. Also, in some of the debating = that was=20 going on, Mr. Wall seemed to think that benchmarks aren't a good way to = tell if=20 a program went fast or slow or somewhere in between. If benchmarks = aren't=20 the way to tell, what would be?</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>Ok, I've said what I wanted to say.</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>Now please, think of my message as a rhetorical one, = and drop=20 the Eu vs Perl (unless you would like to tell me I have no idea of what = I'm=20 talking about, which I wouldn't be surprised.)</FONT></DIV> <DIV> </DIV> ------=_NextPart_000_0021_01BF426C.2F929520-- __________________________________________ NetZero - Defenders of the Free World Get your FREE Internet Access and Email at http://www.netzero.net/download/index.html