Re: Finding Filenames that contain a certain string
Re: Finding Filenames that contain a certain string
- Subject: Re: Finding Filenames that contain a certain string
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 20 Jul 2007 16:55:37 -0400
On 7/20/07, Stockly, Ed <email@hidden> wrote:
I criticize the tendency to answer simple appleScript questions with
difficult to understand shell script solutions
I still question the existence of such a tendency, but OK...
because they tend to
discourage those who want to learn appleScripting and are more comfortable
with an English like syntax. New users come away from this list thinking
appleScript requires a deep knowledge of shell scripting and that's
discouraging.
That is a potential problem, but I have yet to see a question on here
that *only* gets shellish answers. I think the impression we're
giving is rather that in Applescript, there's more than one way to do
it (Perl has no monopoly there), and that's OK. I also don't think
it's necessarily a bad thing to say "here's a chunk of shell code that
solves your problem; don't worry about understanding it". Certainly,
if they want to come back after the problem is solved and learn how
the stuff inside the quotation marks actually works, that would be a
topic for a different mailing list.
In an ideal appleScript world, an appleScript variation of regular
expressions would work:
Well, OK, there's something to be said for a more verbose language
that accomplishes the same goal. Certainly the Perl 6 rules syntax is
quite a bit different from what we think of as regular expressions,
even though it is the successor to the language many regard as the
archetypical regex-containing language. But there's something to be
said for concision and compatibility, too. The advantage of support
for standard regular expression syntax is that it is a standard, de
facto if not de jure, and therefore learning it opens up doors to a
wide variety of programming languages and utility programs beyond
AppleScript. You don't have to open those doors, of course.
And while regexes can get frighteningly complex and look like line
noise to the uninitiated, like anything else you can start simple and
build. Using [a-z] to mean "any lowercase letter", or [0-9] for any
digit, is pretty easy to understand in context. Stuff like
quantifiers and subexpressions and positive and negative
lookahead/behind/around doesn't tend to come up until you run into a
situation where you actually need the capability that goes with the
syntax.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden