请输入您要查询的百科知识:

 

词条 AmbientTalk
释义

  1. Hello world

  2. References

  3. External links

{{Infobox programming language
| name = AmbientTalk
| paradigm = object-oriented (prototype-based) Concurrent Event-driven Reflective
| year = 2006
| designer = Tom Van Cutsem, Stijn Mostinckx, Jessie Dedecker, Wolfgang De Meuter
| developer = Software Languages Lab, University of Brussels
| latest release version = 2.19
| latest release date = April 2011
| typing = dynamic, strong
| implementations = AmbientTalk (interpreter)
| dialects =
| influenced_by = Smalltalk, Self, Scheme, E, ABCL
| influenced = ECMAScript Harmony
| operating_system = Platform-independent
| license = MIT License
| website = http://soft.vub.ac.be/amop
| file_ext = .at
}}

AmbientTalk is an experimental object-oriented distributed programming language developed at the Programming Technology Laboratory at the Vrije Universiteit Brussel, Belgium. The language is primarily targeted at writing programs deployed in mobile ad hoc networks.

AmbientTalk is meant to serve as an experimentation platform to experiment with new language features or programming abstractions to facilitate the construction of software that has to run in highly volatile networks exhibiting intermittent connectivity and little infrastructure.[1] It is implemented in Java which enables interpretation on various platforms, including Android. The interpreter standard library also provides a seamless interface between Java and AmbientTalk objects, called the symbiosis.

The language's concurrency features, which include support for futures and event-loop concurrency, are founded on the actor model and have been largely influenced by the E programming language. The language's object-oriented features find their influence in languages like Smalltalk (i.e. block closures, keyworded messages) and Self (prototype-based programming, traits, delegation).

Hello world

The classical "Hello, World!" program is not very representative of the language features. However, consider its distributed version:

/* Define types that could be discovered on the network */

deftype Greeter;

def makeGreeter(myName) {

    /* Spawn an actor */    actor: {        /* Actors have a separate namespace, include the language futures in it */        import /.at.lang.futures;
        /* A method that could be called by other greeters */        def getName(){myName};
        /* Export this actor on the network */        export: self as: Greeter;                /* Main logic: if we discover another Greeter ... */        whenever: Greeter discovered{|other|            /* Asynchronously get his name, and greet him */            when: other<-getName()@FutureMessage becomes{|name|                system.println("Hello " + name + " from " + myName);            };        };    };

};

/* Spawn 2 actors that will greet each other */

makeGreeter("Alice");

makeGreeter("Bob");

References

1. ^Dedecker J., Van Cutsem T., Mostinckx S., D'Hondt T., De Meuter W. Ambient-oriented Programming in AmbientTalk. In “Proceedings of the 20th European Conference on Object-Oriented Programming (ECOOP), Dave Thomas (Ed.), Lecture Notes in Computer Science Vol. 4067, pp. 230-254, Springer-Verlag.”, 2006

External links

  • AmbientTalk official site
  • [https://code.google.com/p/ambienttalk Open-source interpreter]
{{DEFAULTSORT:Ambienttalk}}

5 : Dynamic programming languages|Experimental programming languages|Object-based programming languages|Prototype-based programming languages|Concurrent programming languages

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/12 13:00:17