百度首页 | 百度空间
 
查看文章
 
FlowerScript
2008-04-21 15:17

FlowerScript

FlowerScript aims to be lightweight, simple and fast scripting language implemented in D. It started with the main purpose to replace PHP for web applications because 1) PHP syntax is... sux 2) PHP is heavy and slow 3) PHP's stdlib is C-like, which means not OO, which means a lot of typing 4) PHP is not flexible at all (for example, see how dynamic functions are implemented); Now the focus has shifted to general purpose language, but the web remains as a goal.

I like the simplicity and flexibility of JavaScript? so FS feels a lot like it (and is natively compatible with JSON), but does not aim for full EcmaScript? compatibility. I've simplified some things where I see fit. There are also some additions from D, like array slicing, foreach loops as well as some fresh ideas. I also like Tango/mootools style libraries, so I will try to make the stdlib similar to these.

Status

Currently, the language is being rewritten from scratch (for the third time). What is in the trunk is revision 2, which is now obsolete and will be deleted soon, when the third revision is published. It looks like there will be no more rewrites since I am quite happy with the performance.

Features/Goals

  • C family syntax; as simple and flexible as JavaScript? and beyond
  • General purpose
  • Dynamic typed
  • Strong type checking
  • Values passed by reference (except for numbers and booleans)
  • Fully customizable
  • Embeddable in HTML
    • As usable for web applications as PHP but lighter and faster
    • Built in encryption, decryption, optimizer and bytecode caching
    • Usable outside web applications
  • Easily extensible from D
  • Small source base, free from bloat, thus
    • Lightweight
    • Fast

Technical

FlowerScript is implemented in D, using the Tango library. Its stdlib will be heavily influenced and based on Tango.

Examples

See the testsuite for examples. Try browsing it backwards, because the most interesting examples are in the end.

Credits

Credits go out for Jarrett Billingsley for his bindings library for MiniD, which I mostly leeched for FlowerScript.


类别:Web | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码:
 

     

©2008 Baidu