[rules-dev] Long DSL lines

Michael Anstis michael.anstis at gmail.com
Sat Dec 4 15:49:03 EST 2010


None here.

Longer term, I wonder whether our DSL syntax is too weak?

Even the ability to declare blocks would be nicer than long lines (and line
split markers):-

then [Book the customer for the flight]
    {
        $f.setAvailable( $f.getAvailable() - 1 );
        update( $f );
        Booking booking = new Booking();
        booking.setCustomer( $r.getCustomer() );
        booking.setFlight( $f );
        insert( booking );
    }


On 4 December 2010 18:33, Wolfgang Laun <wolfgang.laun at gmail.com> wrote:

> Currently each entry must be a single line of text. This results in long
> lines, especially on the RHS.
>
> I have experimentally inserted a transformation of the DSL text (in
> DSLTokenizedMappingFile)
> which converts '\'+EOL on the fly to a space. (The passed-in reader is read
> into a buffer, '\'+EOL
> is translated to space, and EOLs are inserted later to readjust the line
> number.) In a text editor,
> I can now write, e.g.,
>
> then][][Bb]ook the customer for the flight=\
>   $f.setAvailable( $f.getAvailable() - 1 );\
>   update( $f );                            \
>   Booking booking = new Booking();         \
>   booking.setCustomer( $r.getCustomer() ); \
>   booking.setFlight( $f );                 \
>   insert( booking );
>
> Of course, the DSL editor will not preserve this, but future development
> might provide more
> convenient editing there, too.
>
> Any objections?
> -W
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20101204/03d54b13/attachment.html 


More information about the rules-dev mailing list