[Python-ideas] Why shouldn't Python be better at implementing Domain Specific Languages?
Abdur-Rahmaan Janhangeer
arj.python at gmail.com
Fri Aug 31 03:14:35 EDT 2018
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/f09c69dc/attachment.html>
More information about the Python-ideas
mailing list