Re: Complexity of new hardware

Philip Taylor <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
On Tue, Apr 28, 2009 at 1:26 PM, Rachel Blum <[email protected]> wrote:
>>
>> There's JavaScript, which has pretty huge adoption (outside of games),
>> C-like syntax, closures, prototype-based inheritance, active
>> communities working on the language spec and on implementations and on
>> applications, is reasonably elegant and powerful (see some articles on
>> http://www.crockford.com/javascript/), is quite small (the language
>> itself, distinct from the web browser environment (with DOM and AJAX
>> and all that stuff) it typically runs in),
>
> The downside: If you want to include additional JavaScript libraries you
> have to (as far as I know) resort to the web browser as preprocessor. Which
> kind of destroys any idea of modularity.

There's no need to get a web browser involved; but you do need your
embedding application to provide some functionality, since JS has no
built-in API for accessing files or networks. (The core language does
arrays, strings, regexps, dates, maths, etc, but little else.)

That's pretty trivial - in SpiderMonkey it's a dozen lines of code to
define a C function that reads your script library files and passes
them to the script evaluation API, and to expose it to scripts so they
can call it themselves to load other scripts. The language has no
built-in support for concepts like namespacing, but you can use the
same tricks that modern web scripting libraries use (e.g. wrapping
files in anonymous functions so they don't pollute the global
namespace, and then exporting everything as properties of a single
namespace-like global value), and you can do some other tricks using
the JS engine's embedding API. But I guess this is the wrong list for
continuing discussion of such things...

-- 
Philip Taylor
[email protected]

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.