[Haskell-cafe] DSL implementation

Magnus Therning magnus at therning.org
Wed Sep 17 18:31:43 UTC 2014


On Wed, Sep 17, 2014 at 02:02:44PM -0400, felipe zapata wrote:
> HI all,
> as a part of a project for physical simulation, I'm was given the
> task to help with the implementation of an Small DSL that is a
> minimal functional language. Point is that this small language
> contains some dependent typed theory, because we want to be able to
> check statically the shapes of vector and matrices, among other
> things. Haskell of course seems the tool for the job.
> But my boss insists that the implementation should be done in C, but
> I think that it is madness.
> Can someone please point me to relevant literature, discussions or
> general information that can help me to show my boss that Haskell is
> the right tool?
> 
> any help would be appreciated.

Why try to convince him? ;)

There is always the option of disregarding what the boss says and just
do it in Haskell and face the music later.  I've done this kind of
thing a few times, but only when all of the following hold:

 1. I am 100% sure I am right and the other party is wrong
 2. I am confident I can tackle a large enough part of the problem and
    have something to show before reaching a point of no return (i.e.
    I must be able to show something that convincingly shows that I am
    going down the correct path before reaching the point where
    switching to the "inferior path" becomes impossible)
 3. I feel safe enough in my employment that I can handle a
    spectacular failure, or I don't care enough about my employment to
    worry a spectacular failure

If you want to try to convince him I would urge you to not spend too
much time on the technical superiority of using Haskell to implement
the DSL.  Instead you should spend time on finding out what makes your
boss suggest using C.  Is it familiarity?  Is it worry about
future maintenance?  Is it just habit?  C is almost *always* an
inferior choice so anyone arguing in favour of it is probably doing it
for emotional reasons, not technical!  (Only slightly tongue-in
cheek.)

/M

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: magnus at therning.org   jabber: magnus at therning.org
twitter: magthe               http://therning.org/magnus

In a hierarchy, every employee tends to rise to his level of incompetence.
     -- The Peter Principle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140917/eed3441c/attachment.sig>


More information about the Haskell-Cafe mailing list