Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Maximising Language integration: Holy Grail or Dystopia?

by Anonymous Monk
on Jul 14, 2015 at 09:01 UTC ( [id://1134660]=note: print w/replies, xml ) Need Help??


in reply to Maximising Language integration: Holy Grail or Dystopia?

... who's going to write the test suite for and maintain the software which does the code generation?

In my experience the only time that an abstraction like that makes sense is if you know that the targets will change, e.g. abstraction of SQL can make sense if you don't want to be too dependent on which database you're targeting (although my experience has sometimes also been that you eventually do end up using database-specific features anyway, so if you had decided to marry one database at the beginning of the project, you could have avoided the extra abstraction layer).

Other than that - you'll usually only be targeting one version of HTML, one version of JavaScript, etc. - what would the advantages of writing a code generation tool to abstract that be?

Also, right after you say "keep code from different languages mainly separate", you name four "exceptions"... if you spend some more time looking around, I'm pretty sure you'll find that mixing languages is actually pretty common.

  • Comment on Re: Maximising Language integration: Holy Grail or Dystopia?

Replies are listed 'Best First'.
Re^2: Maximising Language integration: Holy Grail or Dystopia?
by anonymized user 468275 (Curate) on Jul 14, 2015 at 09:19 UTC
    I am sure you are right about mixing languages being common. My exposure to that is limited though so I am trying to get a feeling of what the trade-offs would be. You are right too about wanting to avoid getting language drivers stuck at particular versions. This happened with the tool I referred to, although customers often believed getting stuck with a language version was an avoidable mistake by the manufacturers. For example, instead the framework could settle for organising code into integration classes without actually generating statements - i.e. one should abstract only what needs to be abstracted for maintainability.

    One world, one people

      It's worth adding that while mixing languages may be common, it's not necessarily maintainable unless done cleanly, e.g. using templates or at least having clear boundaries between the two languages in the source code. In the wild you'll see code like this all the time: print "<span style=\"font-weight:bold;\" onClick=\"alert('bar!');\">";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1134660]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found