[Python-ideas] Why shouldn't Python be better at implementing Domain Specific Languages?
James Lu
jamtlu at gmail.com
Fri Aug 31 11:39:16 EDT 2018
We should all take a look at Ruby Blocks and think about how Python could benefit from something similar.
> On Aug 31, 2018, at 3:14 AM, Abdur-Rahmaan Janhangeer <arj.python at gmail.com> wrote:
>
> i believe a DSL is simple enough for an enthusiastic py programmer to write if you really wanted one
>
> just write the tasks you need to accomplish, the data needed, the constrcuts needed (if needed), the feel/look of it on your editor
>
> plan first, come up with a good mock, then implement it. implementation is easy, ideas are hard. good ideas offload the efforts on the implementation side, they can also save you future troubles
>
> let me take an example :
>
> a DSL to calculate the cost of houses
>
> aim : calculate cost of houses
>
> input :
> num of houses
> price of house
>
> output :
> price of houses
>
> technical tasks :
> show to screen
>
> it might go on like that
>
> --- file ---
>
> house num 1,000
> house price 250,000
> calculate sum
>
> --- output ---
>
> $ 250 000 000
>
> in the above example, assumptions were made and functions crammed but you have a dsl. real-life dsls are not far from the specs of this one but differ in the tools used
>
> Abdur-Rahmaan Janhangeer
> https://github.com/Abdur-rahmaanJ
> Mauritius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180831/3cdeb6e9/attachment.html>
More information about the Python-ideas
mailing list