Extending Syntax - Functional Programming meets Macros

By Rolf Langsdorf (‎LanX‎) from Darmstadt.pm
Date: Saturday, 8 November 2014 13:30
Duration: 50 minutes
Target audience: Intermediate
Language: English
Tags: extension features language_design macros syntactic_sugar


Perl has huge flexibility to extend its own syntax, not always to the good of the maintainability.

In YAPC Riga 2011 we showed a functional approach to elegantly provide new idioms, including operators and control structures, just by using

a) The syntactic sugar of chaining functions with special prototypes
b) A LISP like macro system which expands functions to inlined code.

(see http://yapceurope.lv/ye2011/talk/3597 )

We argued that this approach is
- more reliable
- easy to install, use, maintain ...
- compatible with established development tools
- less delicate in edge cases

And demonstrated how to extend Perl5 to have idioms like

- List Comprehensions,
- Co-Routines and Gather-Take,

Aim of this presentation is to finish what we started and trying to implement a variety of language features known from Perl6, Python or Ruby.

We will see that the real complexity lies in the design and not in the implementation of good idioms.

The last 10 minutes will be hopefully left for discussions.


Attended by: Toby Inkster (‎tobyink‎), Neil Bowers (‎NEILB‎), Dinis Rebolo (‎drebolo‎), Alex Balhatchet (‎Kaoru‎), vytas, Peter Mottram (‎SysPete‎), Daniel Collins (‎solemnwarning‎), Mark Stringer (‎mullet‎), Mohammad Anwar (‎manwar‎), Sam Kington (‎skington‎), Gianni Ceccarelli (‎dakkar‎), Farhan Siddiqui, James Mastros (‎theorbtwo‎), Dominic Humphries (‎djh‎), Peter Haworth (‎pmh1wheel‎), steve mynott (‎itz‎), Aaron Crane (‎arc‎), Dimitrios - Georgios Kontopoulos, Nikoletta Kourtidou, Nohfu8Ie eeki2Eej (‎uch5Isi7‎), Dagfinn Ilmari MannsÃ¥ker (‎ilmari‎),

Sponsors

Corporate

2nd Quadrant     antibodyMX     Booking.com     CV Library     Eligo     Exonetric     geek University     magnum Solutions     Nestoria     OpusVL     O'reilly Books     Perl Careers     Science Photo Library     Shadowcat
      Systems Limited     Smoothwall Limited

Community

Enlightened Perl Organisation     FlossUK     Perl6 Community