What is the difference between swift language and AppleScript? The development of AppleScript? _ Other

Source: Internet
Author: User
Tags object model system log

I am a non-developer (research worker), using a Mac, recently learned that AppleScript to improve the efficiency of a lot of help, hope to learn AppleScript. But the latest 10.10 systems will be released, and the new swift language is said to be able to achieve AppleScript functions. I would like to know the recent developments in AppleScript (whether Apple will be phasing out the language), and to learn whether Swift does not have to learn AppleScript. Hope expert answer, thank you

1, what is AppleScript

AppleScript is a scripting language used on MacOSX, and the operating system is very tightly coupled, but generally I am not interested in learning a proprietary language that is not widely used, but it is a project need, and the language is really good and easy to learn, as a pastime. Written scripts can be easily executed with Nstask, and the script itself can do almost anything.

The editor can choose to bring the Apple Script Editor right under the application's utilities, the deal is absolutely enough, if you need code hints please check the "Use Script Assistant" in the preferences, and the code hint input is the ESC key, of course you can choose Xcode, It can also create AppleScript files, code hints, what is also more accustomed to, but in a relaxed manner, I still use their own.

Open the AppleScript editor, the panel is very simple, the upper left corner is four main buttons, recording, stop, run, compile. Recording what I haven't used, stop nature Needless to say, the compilation does not matter, because you are in the point of operation will be compiled first. The middle is the encoder box, of course, is used to enter the script, the bottom is described with the system log output, not to do the recording of the general we only need to care about the results of the system log.

2. Swift

Swift is a new programming language for iOS and OS X applications, based on C and objective-c, without some of the compatibility constraints of C. Swift uses a secure programming model and adds modern functionality to make programming simpler, more flexible, and more fun. The interface is based on the cocoa and cocoa touch framework, which is widely loved by people, and shows the new direction of software development.

Swift has existed for many years. Apple is based on existing compilers, debuggers, and frameworks as its infrastructure. Simplifies memory management with arc (Automatic Reference counting, automatic reference count). Our frame stacks are always based on cocoa. Objective-c Evolution supports blocks, collection literal, and modules, allowing the framework of modern languages to be used without depth. Thanks to these basic tasks, you can introduce new programming languages into Apple Software development (Gashero).

OBJECTIVE-C developers will feel Swift's déjà vu. Swift uses the objective-c named parameters and dynamic object model. Provides interoperability between the cocoa framework and the mix-and-match. Based on these fundamentals, Swift introduces many new features and combines process-oriented and object-oriented features.

Swift is also friendly to new programmers. He is an industrial-grade system programming language, but is as friendly as a scripting language. He supports playground, allowing programmers to experiment with a swift code feature and immediately see results without having to bother building and running an application.

Swift integrates the ideas of modern programming languages and the wisdom of Apple's engineering culture. Compilers are optimized for performance, and languages are optimized for development without compromising each other. (by Gashero) can start with "Hello, world" to learn and transition to the entire system. All this makes swift a source of innovation for Apple's software developers.

Swift is a fantastic way to write iOS and OS X applications and will continue to drive the introduction of new features. We can't wait to see you do something with him.

Summarize:

AppleScript is for non-developer language, syntax is close to natural language. As an ordinary user more easy to use, I believe Apple will not eliminate AppleScript.
If you just want to optimize the workflow to improve efficiency, AppleScript can handle it completely. As a new language, Swift has been adjusting its grammar, suggesting that a period of time be relatively mature before learning.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.