3 ms·
tl;dr here are lines from the article to summarize it "The .. point is that Perl 5 gives you a way to build .. (DSL's) that can be seemlessly worked into a ge
by systems 13y ago
tl;dr
here are lines from the article to summarize it
"The .. point is that Perl 5 gives you a way to build .. (DSL's) that can be seemlessly worked into a general purpose programming environment."
"Perl is a language many people love to hate. Here's an example .. of sloppy coding"
"It is very hard to modify safely."
"it is possible to do this sort of thing in any language."
"Let's try this newer Perl code"
"This .. is easier to maintain, and is easier to understand."
"The above two examples ..neither one really shows what Perl is capable of doing"
"Perl itself is a highly malleable language and .. allows you to define domain-specific languages for parts of your program"
"Here's a small class for handling currency records."
"Now the code above .. is effectively entirely declarative."
"What differentiates the examples .. is .. readability, testability, and maintainability."
"How does that work?"
"Perl is a very flexible .. you can add functions that behave .. like keywords."
"The example here uses two modules which provide DSL's for specific purposes."
"The first is Moose"
"The second is PGObject::Util:DBmethod"
"Why is this Powerful and Productive?"
"Compare a framework built as a mini-DSL specification language to one built as an object model."
"In an object model framework one .. has to juggle object-oriented design .. with the desire for greater flexibility."
"DSL's .. allow you to define the object model orthogonally to the framework"
"Other Similarly Powerful Languages"
"Lisp"
"Rebol and Red,.. implementations are still very immature"
"Metaprogramming helps to some extent..in Ruby and Python .. but .. makes it much harder to build a framework that is truly orthogonal to the object model."
" Perl isn't just a programming language, but a toolkit for building programming languages inside it. "
- draegtun 13y agoThe full statement from the article was - Rebol and Red, whose open source implementations are still very immature To clarify this… 1) Rebol 2 is a very mature product. But while free to download & use it remains closed source with no long term future. 2) Rebol 3 is an alpha/beta opensource rewrite of Rebol 2. While Rebol 3 isn't has mature as Rebol 2, it is robust and does run about 2 times faster than Rebol 2 and with other significant design & implementation improvements. However it is incomplete and missing some Rebol 2 features. 3) Red could be viewed as "very immature" because the implementation was only started in 2011. However it is looking very promising and I believe the aim is to get to version 1.0 by end of this year.