[Haskell-cafe] Re: Haskell and Java

Daryoush Mehrtash dmehrtash at gmail.com
Wed Sep 10 13:26:02 EDT 2008

As people have suggested on this list, in order to write a haskell program
you need to develop a mathematical model which requires some serious up
front thinking.  Writing java code on the other hand is more about "coding"
and then "re-factoring".  'Thinking" is discouraged (agile), as the design
is more about how you organize your objects for the illusive "reuse" and
"future requirements" than anything else.  The approach make sense  if you
consider design as an excersize in object organization as you would have
better idea on the object organization (aka design) as you plow through the

On the other hand if you have a mathematical idea, then a language like java
doesn't give you the abstraction tools necessary to implement it as well as
a language like Haskell.  But if you don't have a model, then java's
approach may be more natural (as is evenident by its popularity)

It seems to me that the two can work side by side if you model your
application in  Service Oriented Architecture.   I think the boundries of
the services should be thought of as langauges rather than api (function
calls).  Two different examples that comes to mind are the SQL and Google
Chart.  A Java programmer doesn't care about the SQL Server implementation,
but it depends on its query langauge to create the tables, populate them,
and issue rather complicated queries on them.     Google Chart is
interesting in that it porvideds a language in a URL to implement a service
that has been traditionally considered as library.  I would think if you can
defines such services in your application then you can define a langaugage
and mathematical model around it to implement the service in Haskell.


On Wed, Sep 10, 2008 at 5:01 AM, Mauricio <briqueabraque at yahoo.com> wrote:

> At this time It's not really a question
> of better implementation, but cooperation.
> I know Haskell, they know Java, and it
> would be nice if we could share code and
> work. The idea of the api, or maybe dbus,
> seems OK. It just would be easier if we
> could join everything in a single piece,
> but it is no big deal.
> Maurício
> Daryoush Mehrtash a écrit :
>> Why do you want to mix haskall and Java in one VM?  If there are
>> functionality within your code that is better implemented in haskell, then
>> why not  make that into a service (run it as haskell) with some api that
>> Java code can use.
>> Daryoush
>> On Tue, Sep 9, 2008 at 2:36 AM, Maurí­cio <briqueabraque at yahoo.com<mailto:
>> briqueabraque at yahoo.com>> wrote:
>>    Hi,
>>    I use Haskell, and my friends at
>>    work use Java. Do you think it
>>    could be a good idea to use Haskell
>>    with Java, so I could understand
>>    and cooperate with them? Is there a
>>    a Haskell to Java compiler that's
>>    already ready to use?
>>    Thanks,
>>    Maurício
>>    _______________________________________________
>>    Haskell-Cafe mailing list
>>    Haskell-Cafe at haskell.org <mailto:Haskell-Cafe at haskell.org>
>>    http://www.haskell.org/mailman/listinfo/haskell-cafe
>> --
>> Daryoush
>> Weblog: http://perlustration.blogspot.com/
>> ------------------------------------------------------------------------
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


Weblog: http://perlustration.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080910/765ac29c/attachment.htm

More information about the Haskell-Cafe mailing list