F-Script programming language
Encyclopedia
F-Script is an object-oriented
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

 scripting
Scripting language
A scripting language, script language, or extension language is a programming language that allows control of one or more applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the...

 programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 for Apple Inc
Apple
The apple is the pomaceous fruit of the apple tree, species Malus domestica in the rose family . It is one of the most widely cultivated tree fruits, and the most widely known of the many members of genus Malus that are used by humans. Apple grow on small, deciduous trees that blossom in the spring...

 Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 operating system developed by Philippe Mougin. F-Script is tagged as Cocoa
Cocoa (API)
Cocoa is Apple's native object-oriented application programming interface for the Mac OS X operating system and—along with the Cocoa Touch extension for gesture recognition and animation—for applications for the iOS operating system, used on Apple devices such as the iPhone, the iPod Touch, and...

 developer's best friend, wherein the package provides an integrated set of tools that makes it possible to interactively explore and manipulate Cocoa objects as well as script them using new high-level programming techniques. F-Script is Smalltalk
Smalltalk
Smalltalk is an object-oriented, dynamically typed, reflective programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human–computer symbiosis." It was designed and created in part for educational use, more so for constructionist...

 with support for array programming
Array programming
In computer science, array programming languages generalize operations on scalars to apply transparently to vectors, matrices, and higher dimensional arrays....

 for Cocoa Objects.

Overview

F-Script is based on a pure object paradigm (every entity manipulated within the language is an object), its base syntax and concepts being identical to those of Smalltalk (the canonical example of the category) with specific extensions to support array programming as in the APL programming language
APL programming language
APL is an interactive array-oriented language and integrated development environment, which is available from a number of commercial and noncommercial vendors and for most computer platforms. It is based on a mathematical notation developed by Kenneth E...

.

F-Script provides an interpreted, interactive environment with support for workspaces, which provide a rich set of functionality including object persistence
Object persistence
System prevalence is a simple software architectural pattern that combines system images and transaction journaling to provide speed, performance scalability, transparent persistence and transparent live mirroring of computer system state....

, distributed object
Distributed object
The term distributed objects usually refers to software modules that are designed to work together, but reside either in multiple computers connected via a network or in different processes inside the same computer. One object sends a message to another object in a remote machine or process to...

s, GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

 framework, database
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...

 access, among other things.

Syntax

Like Smalltalk, F-Script's syntax is very simple, without requiring specific notation for control structures which are provided in a unified manner by the message send operation. Unlike Smalltalk, F-Script provides specific notational extensions to support the Array class, using curly brackets to describe literal arrays, which may contain any F-Script expressions. For example, {1+3, 'name', true} is a valid array literal. The empty array is denoted by {}. Arrays of arrays are transparently supported since an array itself is just another object.

Message sending

Message expressions in F-Script are similar to those in Smalltalk: they specify which object is the receiver of the message, which operation is called by the message, and any argument objects needed by the operation. F-Script supports unary, binary, and keyword messages.
F-Script message semantics are extended to support Array Programming by recognizing that an array operation, such as adding to numerical vectors, must be viewed as the generation of a number of messages relating the elements of the vectors involved. Thus, if A = {1, 2, 3} and B = {10, 20, 30}, then in F-Script you can have:
A + B = {11, 22, 33}

Usage

F-Script is chiefly used as a lightweight scripting layer on top of Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

's Cocoa
Cocoa (API)
Cocoa is Apple's native object-oriented application programming interface for the Mac OS X operating system and—along with the Cocoa Touch extension for gesture recognition and animation—for applications for the iOS operating system, used on Apple devices such as the iPhone, the iPod Touch, and...

 API
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

. It can be embedded in applications using the F-Script framework and Interface Builder
Interface Builder
Interface Builder is a software development application for Apple's Mac OS X operating system. It is part of Xcode , the Apple Developer Connection developer's toolset. Interface Builder allows Cocoa and Carbon developers to create interfaces for applications using a graphical user...

palettes. It can also be used interactively from the F-Script interpreter to prototype applications. Finally, it can be used to explore applications' object hierarchies using an injector such as F-Script Anywhere.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK