[Python-ideas] Why shouldn't Python be better at implementing Domain Specific Languages?

Steven D'Aprano steve at pearwood.info
Fri Aug 31 11:54:33 EDT 2018


On Fri, Aug 31, 2018 at 11:14:35AM +0400, Abdur-Rahmaan Janhangeer wrote:

> let me take an example :
> 
> a DSL to calculate the cost of houses
[...]
> --- file ---
> house num 1,000
> house price 250,000
> calculate sum
> 
> --- output ---
> $ 250 000 000

I don't think the problem is people coming up with DSLs for their 
problems, but implementing those DSLs. Writing an informal specification 
is easy; writing the implementation is trickier.

For the above, you need an interpreter for the DSL, otherwise it is 
just a static data file that generates no output at all.



-- 
Steve


More information about the Python-ideas mailing list