[Nix-dev] [***SPAM***] Re: Use Haskell for Shell Scripting
Michael Raskin
7c6f434c at mail.ru
Mon Feb 2 20:53:26 CET 2015
>The Typed Racket idea is pretty good. I would point out, however, that
>it only addresses the type-safety concern Joe brought up; not purity.
>It's still pretty idiomatic Typed Racket to use side-effects and
>mutation from otherwise pure code.
I should note that the default types offered are immutable and there are
many type libraries available that provide immutable data structures for
mor advanced uses.
Of course you can break purity easily; of course the real Haskell
implementation is GHC and it has unsafePerformIO. There are ways to
confine impurity in both languages and there are ways to break purity
in both languages.
Also, I would prefer not to have side-effect-less scripts, but that is
just my personal preference.
What I want to say is: Typed Racket allows you to easily keep adherence
to your goals, has made very different tradeoffs in many places, and is
neither better nor worse than Haskell (Scheme macrosystem designe means
_some_ libraries are easier to both write and use; there are probably
cases where Haskell type system allows to explain things via types way
better than Typed Racket). I just wanted to show that it is hard to make
objective comparative statements.
Yes, I know Python2 well and still prefer POSIX Shell for many scripting
tasks; and my language of choice is often Common Lisp...
More information about the nix-dev
mailing list