User:Tfdyrtswa3w4se5dr/JSX (programming language)
This is not a Wikipedia article: It is an individual user's work-in-progress page, and may be incomplete and/or unreliable. For guidance on developing this draft, see Wikipedia:So you made a userspace draft. Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Paradigm | Object-oriented[1] |
---|---|
Designed by | DeNA, Co., Ltd. |
Developer | DeNA, Co., Ltd. |
First appeared | May 31, 2012[1] |
Preview release | 0.9.89
/ May 20, 2014[2] |
Typing discipline | Static typing[1] |
OS | Cross-platform |
License | MIT License |
Filename extensions | .jsx |
Website | jsx |
Influenced by | |
JavaScript |
JSX is a programming language developed by DeNA DeNA for web applications. ECMAScript it has a syntax that was affected from 4, static typing of the features. Web Browser are made for the purpose of eliminating the disadvantages of the Script Language of the embedded JavaScript. Moreover source code JSX is performed by converting the optimized JavaScript code, compared to the equivalent JavaScript programs are to become faster than 10% [1][3].
Language specification
[edit]Features of the JSX include:
- Class syntax support
- Module mechanism
- Support of templates (generic types)
- Function overloading support
- Arrow function
- Lexical scope for
this
- The default argument
Assert statement be removed in a * optimization
- Profiler (also available on the smartphone)
- Source map of support
- Primitive type (number, boolean, string) do not accept
null
Examples
[edit]Hello world program is as follows: [4]. JSX program '_Main.main (: string []): void' is the entry point for the application.
class _Main {
static function main (args: string []): void {
log "Hello, world!";
}
}
In JSX, to the generic operations without the inheritance class use interface. Program that uses the interface is as follows: [4].
// An example for class inheritance and interfaces
interface Flyable {
abstract function fly (): void;
}
abstract class Animal {
function eat (): void {
log "An animal is eating!";
}
}
class Bat extends Animal implements Flyable {
override function fly (): void {
log "A bat is flying!";
}
}
abstract class Insect {
}
class Bee extends Insect implements Flyable {
override function fly (): void {
log "A bee is flying!";
}
}
class _Main {
static function main (args: string []): void {
// Fo bar
var bat = new Bat ();
var animal:. Animal = bat; // OK A bat is an animal.
animal.eat ();
var flyable:. Flyable = bat; // OK A bat can fly
flyable.fly ();
// For Bee
var bee = new Bee ();
flyable = bee; // A bee is also flyable
flyable.fly ();
}
}
See also
[edit]References
[edit]- ^ a b c d "Web that can generate faster JavaScript code be published application for language "JSX" is". SourceForge.JP. 2012-05-31. Retrieved 2012-06-01.
- ^ Releases · jsx / JSX - GitHub
- ^ http://www.slideshare.net/kazuho/jsx-optimizer
- ^ a b "JSX Tutorial". JSX. Retrieved 2012-06-01. Cite error: The named reference "jsx_tutorial" was defined multiple times with different content (see the help page).
External links
[edit]- Official website (in English)
{{FLOSS-stub}}