Feed on
Posts
Comments

Extending the e Language with Anonymous Methods

Many programming languages like Python, Perl, and Ruby support anonymous methods, typically through classes or other constructs representing a block of code. These are useful to construct code by a higher-order method or to be used as arguments by higher-order methods.

The e language knows code blocks in (for example) list pseudo-methods and macro definitions, but they are defined statically and cannot be referenced, unlike the aforementioned languages. Using reflection, template structs, and define-as-computed macros, we implemented anonymous methods functionality in the e language, modeled after the corresponding Ruby feature.

It is licensed under Apache 2.0 and available in the vlab_util package.

The full article, written by our consultant Thorsten Dworzak, is published on the Cadence blog here:

http://community.cadence.com/cadence_blogs_8/b/fv/archive/2015/07/10/extending-the-e-language-with-anonymous-methods

See http://www.verilab.com/resources/other-downloads/ for download information.

Leave a Reply

Captcha
Enter the letters you see above.

Work For Verilab