SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Burk Hufnagel wrote:Sounds like you;ve got some experience with using ANTLR. My question is how efficient is the code ANTLR generates versus the code a good developer would create to do the same task?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Burk Hufnagel wrote:As I understand it, creating a performant language is beyond the scope of the book. However, I am curious as to the performance of the kind of languages that the book does help us create as compared to a similar application written in java.
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Burk Hufnagel wrote:I'm assuming that a DSL that generates code can't look at the code it's generated and determine that it's substandard in terms of efficiency the way that a human programmer could. If that's the case then one of the trade-offs in using the DSL is that the programmer can get done sooner and perhaps with fewer defects, but the code that is generated/executed is slower because it hasn't been optimized the way that the code in a general purpose language could be.
Terence Parr wrote:Yep, DSLs are trade-offs between runtime efficiency and expressivity. I would say that most problems that cry out for a DSL don't really care about efficiency. Heck, you might be waiting on the network or disk or user much of the time anyway. speed of generated code or execution in an interpreter matter most for general-purpose programming languages I think.
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|