[Haskell-beginners] Haskell code as DSL

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Sat Mar 22 17:37:23 UTC 2014


On 22/03/14 17:15, Rosario Borda wrote:
> Thank You,
> but are the keywords of haskell translatable using the "function" approach
> suggested (case, of - data - ...)?
> 
> Rosario
> 
> 
> 2014-03-21 17:59 GMT+01:00 Kim-Ee Yeoh <ky3 at atamo.com>:
> 
>>
>> On Fri, Mar 21, 2014 at 3:17 AM, Mateusz Kowalczyk <
>> fuuzetsu at fuuzetsu.co.uk> wrote:
>>
>>> What's wrong with making something like Prelude.Italian which re-exports
>>> the common functions under their Italian equivalents?
>>>
>>
>> Yes, a Prelude with Italian names is a great idea!
>>
>> -- Kim-Ee
>>

No, they aren't but considering how few keywords Haskell has, this
shouldn't be a problem and your students would learn some Haskell rather
than some Template Haskelled wrapper around it which they can't relate
to when they go and look stuff up.

case of
data
newtype
module
if then else
class
type
do
where
let
newtype
instance
import qualified as
hiding
pattern
proc

That's just about it and you won't be using all of these at once either.
If you really want to go with ‘translate everything’ approach, what are
you going to do about error messages? Even if you alias the used
built-in types, GHC will still often strip the alias.

I understand translating some function names because there are many
functions and it's easier to remember what it does if it's a word you
know, but I think going beyond that is going to be harmful in a long run.

If you want to introduce your students to FP using Haskell then please
use Haskell! Using TH to hide Haskell seems counter-intuitive. I'm
sceptic whether the word ‘instance’ or ‘module’ will mean anything more
to young students whether it's in English or Italian.


-- 
Mateusz K.


More information about the Beginners mailing list