Re: carriage return & line feeds
Re: carriage return & line feeds
- Subject: Re: carriage return & line feeds
- From: Arthur J Knapp <email@hidden>
- Date: Fri, 08 Jun 2001 16:30:38 -0400
>
On Friday, June 8, 2001, at 10:19 AM, Arthur J Knapp wrote:
>
>>> Unix: ASCII character 10 (aka "\n" to Perl and C users, aka line feed)
>
>> Hey, you leave Perl out of this!
>
I genuinely didn't know about this behavior in Perl. No slight
>
intended;
OK, this is way too politically correct, I don't think that we
really have to worry about hurting the feelings of a programming
language... ;-)
>
> JavaScript OSA is the same way. Personally, I find it confusing.
>
>
... I have a lot of respect for Perl, even if it does look like
>
line noise sometimes. ;)
[OFF]
There are a lot of pros and cons with regard to Perl. I tried using
MacPerl for a little while, but ultimately, the experience was
simply too "un-Mac-like".
I liked things like standard input/output, evaluation-context, and
the dozens/hundreds of built in commands. In fact, many of my general
purpose AppleScript handlers have been based on concepts I discovered
while exploring Perl.
BUT:
It seemed to me that the biggest draw-back to Perl is also it's
supposed strength, "There's More Than One Way To Do It". The best way
to learn how to master a language is to study the work of others, but
since no two Perl scripters ever do anything the same way, it becomes
an almost impossible task to "learn by example". You end up having
to memorize every single aspect of the language all at once to be
able to understand what anyone else is doing.
>
... I'd like to add a
>
general character-escaping scheme to AppleScript, but it's been a
>
relatively low priority.
"Really?" & return & tab & "I wasn't aware of that." & return & return
;-)
>
> set someString to "Hello\rWorld"
>
>
>
> -- after compile:
>
>
>
> set someString to "Hello
>
> World"
>
>
>
> I mean, it kind of defeats the whole purpose of escaping in the
>
> first place, doesn't it?
>
<Cough.> Yes, I'm aware of the problem. It bugs me, too. The problem
>
is, what if you put a literal return in there in the first place? It
>
would be rude to turn it into "\r", but we don't currently have a way to
>
track exactly what you typed. I'll have to think more about that, but I
>
suspect it's unmanageable.
<Appreciative sigh.> Excellent point.
>
... Maybe a preference somewhere...
Excuse me, I have to sent an email to Mark Alldritt... ;-)
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://www.latenightsw.com/freeware/JavaScriptOSA/