[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] When is \r really \n in MacPerl!?



At 8:43 PM -0500 2/9/98, Paul J. Schinder wrote:
>Excuse me?  What makes you thing that \n and \r have fixed values?  (Hint:
>Kernighan and Ritchie is no longer the standard.)
>
>The results of your script are exactly right for MacPerl, and it makes
>utter sense to do this under MacOS.

I do plenty of development on the Mac... and it doesn't make "sense" to
switch around common escape characters that are pretty well defined in the
ascii namespace.

What makes "sense" is for the a Mac program to understand what \r and \n
are and to do the right thing for the end user's visual result.  Changing
the meaning in a programming language can be disastrous.

\r in the Perl books says it is a "carriage return"... as the rest of the
world understands it!  Even as Mac users understand it!

One does not expect to ask for a "carriage return" character via the escape
sequence \r only to get a 0x0A!

It's *not* right for MacPerl... it's not *right* for MacOS.

Of course, I've been down this similar path on this mailing list before and
I already know what will happen.  There will be a bunch of people proclaim
how MacPerl does it the Mac way, how we all ought to be glad Perl is even
on the Mac... how much work the programmer has put into the product...
yadda yadda yadda.

The sad part is that MacPerl *could* do the right thing on the Mac.  It
could recognize a perl script to have DOS, Unix, or Mac line endings.  It
could print out a newline to it's screen as a CR.

Most other language based products do so on the Mac (since the Mac is the
*most* flexible computer around).  MacPerl isn't flexible... it just cheats
by tweaking well defined things around.

mark

---------------------------------------------------------------------------
 Mark F. Murphy, Director Software Development   <mailto:markm@tyrell.com>
 Tyrell Software Corp                            <http://www.tyrell.com>
 PowerPerl(tm), Add Power To Your Webpage!       <http://www.powerperl.com>
---------------------------------------------------------------------------
Member of Families Against Internet Censorship: rainbow.rmi.net/~fagin/faic



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch