Roll your own language?


  • Winner of the 2016 Presidential Election

    This product claims to let you create your own languages and use them interoperably with other languages.  It sounds great in theory but something makes me cautious.  I can only imagine some of WTFey homebrew languages users could come up with.  On the other hand, I'd like to combine my favorite features from a number of languages.  The main problem, I guess, is collaborating with other developers.  Could you imagine a program cobbled together in eight custom languages?

    I can't decide whether this is stupid or ingenious.  Has anyone tried it?



  • I vote ingeniously stupid.

    I would kill somone for using such a system; It requires me to understand the misguided insanity that someone will call a language.
    I'm already frustrated enough with people abusing existing languages. 



  • It sounds very useful.  Esoteric language development is terribly hobbled by the lack of good IDEs.

    And it uses Java too! what could possibly go wrong when you implement a memory-intensive application in Java?
     



  • The point is that you can extend Java with arbitrary language generation rules.

    F.e.

    XMLDocument xmlDoc = new Xml(new HeadElement(new Body(), "someText", new Tag("someOtherText")));



  • @joe.edwards@imaginuity.com said:

    This product claims to let you create your own languages and use them interoperably with other languages.

    It's not a new idea. As far as I am aware, the first occurrence of it was lisp, in 1958.

     

    I can't decide whether this is stupid or ingenious.  Has anyone tried it?

    It has been exhaustively studied over the past 50 years. Consensus is that it doesn't really work well enough to be worthwhile - the costs are high and the benefits quite small. You create a lot of extra work for something that ultimately doesn't do much more than remove a few annoyances; there are no major gains in productivity.

    Basically, a good programmer can work about as well in any reasonably good language, so you don't really win very much by customising the language. You're far better off just building a really good metaprogramming system (like perl or lisp has) and leaving it at that. 



  • There are time when a really simple DSL is the most elegant way to solve a problem.

     

    You get to move all the error checking (potential bugs) into one spot. You can completely remove thousands of lines of (potentially) buggy code into a couple hundred. The program becomes much more maintainable. And if your DSL primarily works with an external library you have a nice buffer against API changes.

     

    Of course, there are millions of times when this is a bad idea, and millions of programmers who don't understand reflection etc. and it can end in disaster. The trick is to keep it simple enough that it can ONLY deal with the problem domain it was meant to. 



  • @asuffield said:

    Basically, a good programmer can work about as well in any reasonably good language, so you don't really win very much by customising the language. You're far better off just building a really good metaprogramming system (like perl or lisp has) and leaving it at that. 



    THANK YOU!! My boss has me sitting in on some interviews and I keep wanting to hurt the candidates that don't get that.



  • Domain specific languages can be usefull for specific tasks, especially if you want to enable powerusers to customize the system i.e. by expressing business rules in a language without curly brackets.



  • @ammoQ said:

    Domain specific languages can be usefull for specific tasks, especially if you want to enable powerusers to customize the system i.e. by expressing business rules in a language without curly brackets.

    Yes, but - unless you're going to be writing really large amounts of code in those languages, they don't usually repay the cost of implementing and maintaining them.



  • Finally my dream comes true! My next application will use :

    COBOL as a business layer,

    Mumps for the databse/backend,

    Wasabi will act as the front-end.

    Oh, and it will have brainfuck as the scripting language.



  • I like that new buzzword they throw in, Language Oriented Programming. (Which makes as much sense to me as "tool oriented manufacture", that is, none)

    Just don't let your CEO hear it or you are in serious trouble... 



  • I was going to say: as long as it's just Lisp, it sounds like a good idea!

    Other dynamic languages like Ruby let you get pretty darn close to cobbling together a DSL out of standard Ruby parts (paren-less methods, symbols, reflection).



  • @joe.edwards@imaginuity.com said:

    Could you imagine a program cobbled together in eight custom languages?

    This can already be done using .NET. You have lots of languages to work with there.

    I'm glad I don't have to do anything like that myself. I think that would be a maintenance nightmare.

    I worked at a company once that had a flagship internal system that was comprised of a Delphi front-end that talked to a C/C++ DLL that talked to a CORBA layer that talked to a Java layer that interfaced with two separate Oracle instances to store and manipulate data. It was LOADS of fun tracking down bugs or making changes to that, I'll tell ya. 


  • Winner of the 2016 Presidential Election

    @KenW said:

    @joe.edwards@imaginuity.com said:

    Could you imagine a program cobbled together in eight custom languages?

    This can already be done using .NET. You have lots of languages to work with there.

    I'm glad I don't have to do anything like that myself. I think that would be a maintenance nightmare.

    I worked at a company once that had a flagship internal system that was comprised of a Delphi front-end that talked to a C/C++ DLL that talked to a CORBA layer that talked to a Java layer that interfaced with two separate Oracle instances to store and manipulate data. It was LOADS of fun tracking down bugs or making changes to that, I'll tell ya. 

    Yes, but those languages at least are documented and standardized.  I'm talking about each developer "making up" their own dialect with subtle differences that may not be readily apparent to others, and only documented in the creator's mind.



  • @joe.edwards@imaginuity.com said:

    Could you imagine a program cobbled together in eight custom languages?

    Yes, it's called "anything written in Common Lisp".
     


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.