Jump to content

User:Tfdyrtswa3w4se5dr/JSX (programming language)

From Wikipedia, the free encyclopedia
JSX
ParadigmObject-oriented[1]
Designed by DeNA, Co., Ltd.
DeveloperDeNA, Co., Ltd.
First appearedMay 31, 2012 (2012-05-31)[1]
Preview release
0.9.89 / May 20, 2014 (2014-05-20) [2]
Typing disciplineStatic typing[1]
OSCross-platform
LicenseMIT License
Filename extensions.jsx
Websitejsx.github.io
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]

  1. ^ 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.
  2. ^ Releases · jsx / JSX - GitHub
  3. ^ http://www.slideshare.net/kazuho/jsx-optimizer
  4. ^ 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]

{{FLOSS-stub}}