I love AppleScript because whenever somebody asks, "Why don't they make programming languages more like English?" all you need to do is show them AppleScript. The functionality exposed by OSX apps via AppleScript is often incredible, but the language itself is annoying. The question is whether or not applications will support it. With the emphasis shifting away from OSX desktop applications to cross-platform and clou…
You show them AppleScript and SQL and they say "Wow, what was I thinking, english is a terrible basis for a programming language."
JavaScript as an alternative to AppleScript on OS X Yosemite
41–50 of 126 posts
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#42Earlier quoted context omitted.
Could not have happened to a better language! It's about time Javascript finally has its chance to shine.
That's the whole point, it could've happened to a much better language.
Google, Mozilla, Microsoft, and Opera (and obviously Apple) haven't exactly been jumping at the opportunity to deprecate Javascript in or out of the web. I mean hell, now we have technologies like Node and asm.js that make Javascript the fastest dynamic language in existence! People are even using it in embedded hardware now! So it can't be nearly as bad as people say.
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#43I love AppleScript because whenever somebody asks, "Why don't they make programming languages more like English?" all you need to do is show them AppleScript. The functionality exposed by OSX apps via AppleScript is often incredible, but the language itself is annoying. The question is whether or not applications will support it. With the emphasis shifting away from OSX desktop applications to cross-platform and clou…
Yup :-) AppleScript has an interesting history, it used to support multiple "natural languages" (such as French, ...) in addition to English: http://www.cs.utexas.edu/~wcook/Drafts/2006/ashopl.pdf
(This is probably why many AppleScript Guides still say "English Dialect" on the first page, e.g. http://download.info.apple.com/Apple_Support_Area/Manuals/se... )
Here's a Dijkstra rant from '77 against natural language programming: http://www.cs.utexas.edu/~EWD/transcriptions/EWD06xx/EWD667....
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#44A lot of people in this thread have misconceptions about what AppleScript is and what it means for JavaScript to be an alternative. I recommend watching the WWDC session [1] if you can, and skip to 16 minutes in (through minute 20) for a quick explanation of what this actually is. TL;DR shell scripting for the GUI, not a way to build Mac applications (which you can already do with JS). Edit: video link Double edit: L…
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#45Earlier quoted context omitted.
That's the whole point, it could've happened to a much better language.
Really? I don't see anything particularly wrong with Javascript... I mean, sure it's no PHP, but compared to travesties like Lua (1-based, seriously? What year is it again?) and bloated, convoluted semantic messes like Python and Ruby... well there aren't many choices left! Google, Mozilla, Microsoft, and Opera (and obviously Apple) haven't exactly been jumping at the opportunity to deprecate Javascript in or out of…
Yup, we're getting trolled...
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#46I love AppleScript because whenever somebody asks, "Why don't they make programming languages more like English?" all you need to do is show them AppleScript. The functionality exposed by OSX apps via AppleScript is often incredible, but the language itself is annoying. The question is whether or not applications will support it. With the emphasis shifting away from OSX desktop applications to cross-platform and clou…
You show them AppleScript and SQL and they say "Wow, what was I thinking, english is a terrible basis for a programming language."
About all I'd change is placing the column names after the table/object names - "FROM table1 SELECT col1, col2" instead of "SELECT col1, col2 FROM table" because it makes code assist features easier. (Microsoft did this with LINQ)
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#47A lot of people in this thread have misconceptions about what AppleScript is and what it means for JavaScript to be an alternative. I recommend watching the WWDC session [1] if you can, and skip to 16 minutes in (through minute 20) for a quick explanation of what this actually is. TL;DR shell scripting for the GUI, not a way to build Mac applications (which you can already do with JS). Edit: video link Double edit: L…
What video?
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#48Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#49This makes me really happy. I kind've wish they'd used $ for what Application() is, though, to keep an analogous similarity with jQuery and the like.
Could there be any reasonable situation where one might want to load jQuery within this environment, though? (Although, I suppose, you could use another var for jQuery, such as, uh, 'jQuery' ...)
...unless one of them exposes a HTML DOM to the scripting layer, now that I think of it.