Re: Just submitted this to BugReporter as feature request - comments...
Re: Just submitted this to BugReporter as feature request - comments...
- Subject: Re: Just submitted this to BugReporter as feature request - comments...
- From: "John C. Welch" <email@hidden>
- Date: Sat, 10 Apr 2004 20:41:21 -0500
On 4/10/04 3:03 PM, "Jim Witte" <email@hidden> wrote:
>
Hi,
>
>
Last night I submitted the following to Apple's Bugreporter ad a
>
feature request. Anyone have any comments - or are lots of other
>
people here "HyperCard veterans"?
>
>
It would be SO nice if in Applescript I could simply write:
>
>
put 5 into tVar
>
put "set x to" && quote & tVar & quote && "+10" into tCommand
>
[...]
>
>
than the rather cumbersome (and much less Englishlike)
>
>
set tVar to 5 -- or equivalently 'copy 5 to tVar'
>
set tCommand to "set x to \"" & tVar & "\"+10"
>
[...]
>
There's no difference except for using the word quote instead of the quoting
symbols. They do the same thing, and are just as easy to read if you
understand the syntax. If you're not sure about HC syntax, does put replace
or concatenate or in(de)crement?
As well, are you shooting for a result of "set x to 5 + 10" as a string
without the beginning and end quotes? Because if so, your syntax is obtuse.
Try
set tCommand to "set x to " & tVar & " +10" should work and is much easer.
If you wanted the beginning / end quotes in, then try
set tCommand to "\"set x to " & tVar & " +10\""
I'm asking because your AS syntax will givve you
set x to "5+10"
So I'm not sure what you're trying to do.
>
First of all, the word 'quote' is just easier on the eye than the
>
escape-double-quote, except perhaps for people who are used to reading
>
Perl for a living - which I don't think AS's audience is.
Not to me...i never did HC, so that syntax seems rather obtuse. Why use
quote and a double ampersand when you could just use quote and shove the
space in?
I don't do Perl for a living, and I get it just fine. AppleScript is not
Hypertalk. And that's a good thing.
>
>
The && operator for concatenation with a space is not as intuitive, but
>
it is simple, and accomplishes a function that one often wants to do
>
when composing text. It is both easier (some would say more concise)
>
than using the 'space' keyword, and is easier on the eyes than writing
>
"this string " & "has a space in it" with the space at the END of the
>
first string literal - the eye can VERY easily miss that space, or
>
worse, delete it by mistake.
I disagree. If you have complex concatenation, both methods are going to be
hard to read, but I can use other tools to parse them
>
>
As for the 'put' command - I have never liked AS's 'set' command - it
>
makes sense to *set* properties such as the height of an object. It
>
does not however make as much sense to "set" a variable.
It makes perfect sense. You are setting the value of a variable to a value.
It's quite natural. Do you put five minutes into a timer? Of course not, you
set the timer for 5 minutes. That's the real way you set values.
>
It makes
>
sense, but it's not what people generally say when they are referring
>
to real world containers, which after all, are what variables are -
>
containers. One never says "I set water into the bucket". HC
>
succeeded because the programming language metaphors matched the
>
real-world metaphors they were trying to emulate. AS doesn't do this
>
as much (and I have written quite a lot of HC in my time, and a fair
>
amount of AS too)
HC was also designed around a card stack. Your example is a strawman,
because it simplly doesn't apply. It's not how you work with variables.
>
Generally, I would hope that Apple would resurect the entire HC
>
language syntax, and re-create it as an AS dialect (if those still
>
exist in the current codebase - I know they did at one point). This
>
would be of great benefit if there are still a bunch of HyperCard
>
veterans like me out there (I don't know), especially if Applescript
>
Studio were reworked into an interface as easy to use as HC (instead of
>
requiring one to use xCode and IB, which while much more powerful, is
>
also somewhat intimidating than just having a little palette with 15 or
>
18 buttons on it, creating little buttons, and editing their scripts
>
all in one place..
Dear god no. I hated HC. It made no sense at all to me, and I tried it for
years.
>
>
Hypercard was one of the most innovative, possibly THE most
>
innovative application or technology on the Mac ever, aside from the
>
Mac itself.
And now it's dead. Buy supercard or move on.
>
Plus, for users, the "Steve Jobs keynote selling-point demonstration"
>
is obvious: how would you like to be able to create a customizable list
>
of stock quotes that would always be on your desktop, yet roll away at
>
the click of a mouse, in only 6 lines of code? And it would take you
>
less than 5 minutes to do." and it could be done, eith HC and SOAP
>
queries..
And I can build a web browser in Cocoa FAR faster than you can in HC, so
what's the point?
Anyone can create the perfect demo. That's not an example of what a language
is good for.
john
--
The cops never think it9s as funny as you do.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.