[Haskell-cafe] Monad.Reader 8: Haskell, the new C++
Peter Verswyvelen
bf3 at telenet.be
Fri Sep 14 15:55:16 EDT 2007
I'm not sure, I don't know LISP in detail, but as far as I know, LISP is
a fully dynamic language.
I actually meant a static language where you build your own strong types
using the language itself. On the micro level, the language only knows
abouts bits and bytes without semantics, just like assembler, no types
at all. But the language allows you to build whatever "type" or
"semantics" you want from scratch, by providing a keyword that forces
certain part of the program to be evaluated at compile time. A bit like
macros, but written in the same language. Although not exactly the same,
the Digital Mars D language has a "static if (p) { q }" statement, where
p must evaluate to a constant expression at compile time, otherwise the
compiler gives an error/warning (I'm not sure, haven't tried it yet).
You can do that in C++ (using templates) and Haskell (using types) but
these are actually mini-sub-languages. Probably giving control to the
programmer of how type-checking should be coded bypasses the advantages
of strong typing, so this is most likely a dumb idea...
Anyway, I should not mention these ideas, I'm just a programmer, not a
computer scientist ;-)
Peter
Adrian Neumann wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
> I heard only rumors, but isn't Lisp supposed to be just that? A
> programmable programming language?
>
> Peter Verswyvelen schrieb:
>
>> This is all very cool stuff, but sometimes I wander if it isn't possible
>> to drop the special languages for fiddling with types, and introduce
>> just a single language which has no types, only raw data from which you
>> can built your own "types" (as in the old days when we used macro
>> assemblers ;-), but the language has two special keywords: static and
>> dynamic, where code annotated with static runs in the "compiler domain",
>> and code annotated with dynamic runs in "application domain". Of course,
>> I don't know much about this, so this idea might be totally insane ;-)
>> Probably this is impossible because of the halting problem or something...
>>
>> Pete
>>
>> Don Stewart wrote:
>>
>>>>> Better here means "better" -- a functional language on the type
>>>>> system,
>>>>> to type a functional language on the value level.
>>>>>
>>>>> -- Don
>>>>>
>>>>>
>>>> For a taste, see Instant Insanity transliterated in this functional
>>>> language:
>>>>
>>>> http://hpaste.org/2689
>>>>
>>>> NB: it took me 5 minutes, and that was my first piece of coding ever
>>>> with Type families
>>>>
>>>>
>>> Wow. Great work!
>>> The new age of type hackery has dawned.
>>>
>>> -- Don
>>> _______________________________________________
>>> 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
>>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFG6ikc11V8mqIQMRsRA+PzAKCN0bC6lv8p9WEwJkJrcczktIdKGACfUdkt
> 0QBGlmgwfYrKS6lKEwQihkc=
> =31jo
> -----END PGP SIGNATURE-----
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070914/9f3a0b87/attachment.htm
More information about the Haskell-Cafe
mailing list