Again, using Wikipedia as a reference point for discussion, looking at the advatnages and disadvantages of a DSL, and compare them to Gen.
Advantages
- Domain-specific languages allow solutions to be expressed in the idiom and at the level of abstraction of the problem domain. Consequently, domain experts themselves can understand, validate, modify, and often even develop domain-specific language programs.
- Self-documenting code.
- Domain-specific languages enhance quality, productivity, reliability, maintainability, portability and reusability.
- Domain-specific languages allow validation at the domain level. As long as the language constructs are safe any sentence written with them can be considered safe.
Disadvantages
- Cost of designing, implementing, and maintaining a domain-specific language.
- Finding, setting, and maintaining proper scope.
- Difficulty of balancing trade-offs between domain-specificity and general-purpose programming language constructs.
- Potential loss of processor efficiency compared with hand-coded software.
- Hard or impossible to debug.
The text of the advantages clearly describe Gen's facilities and features. However, some of the disadvantages, in my opinion, do NOT describe Gen appropriately:
- Cost of designing, implementing, and maintaining a domain-specific language.
Clearly, this does relate to Gen – Gen is presumably not a cheap product to maintain
- Finding, setting, and maintaining proper scope.
I'm presuming that this relates to the scope of the language constructs – over time, a DSL MUST evolve to take in new markets, otherwise the domain for which the language was created becomes saturated. Certainly Gen has evolved over the years to include featues that could arguably make it a non-DSL, such as web presentation etc.
- Difficulty of balancing trade-offs between domain-specificity and general-purpose programming language constructs.
This is something that I believe doesn't describe Gen very well. Gen is a DSL in that its primary purpose is manipulating RDBMS data for business applications. I think that there is a clear line dividing the RDBMS-based features and "other" functionality – its called Externals – where's the difficulty there ?!
- Potential loss of processor efficiency compared with hand-coded software
Maybe – I agree with this to a certain extent – there doesn't exist the capability for us to tune our SQL with ease. Therefore, we are relying on the parsers and optimisers of the target database to do this for us.
- Hard or impossible to debug.
No !!!
In conclusion – ALL of the advantages hold true for Gen but most of the disadvantages don't !
So – is Gen a DSL ? – I actually think that it is – so – what's the domain ?
"Data Manipulation" – maybe – it that's a technical rather than a business domain – but still Gen is on the DSL boat (I think !!!!…..)
Read original
blog post
Read original
blog post