Re: [q-lang-users] H/M-based typing for Q
Brought to you by:
agraef
From: Andrew B. <an...@vo...> - 2006-11-30 19:02:47
|
Being a not-quite-reformed ADA programmer, I like the idea of stronger = type checking. I kind of miss compile time errors. At the same time, = the fact that I don't know anything about Hindley/Milner-based type = systems means that I really don't feel qualified to contribute anything = of value here. That being said, I am in favor of a faster native code compiler. Are = there optimizations that become possible with stronger type system that = are impossible without one? It seems to me that if all of the equations = for a program are known at compile time (and as Q is defined now, I = think that is the case) then it should be reasonable to infer a lot of = the type information at compile time. No? -andrew -----Original Message----- From: q-l...@li... [mailto:q-l...@li...]On Behalf Of Albert Graef Sent: Tuesday, November 28, 2006 12:12 AM To: Discuss the Q language. Subject: [q-lang-users] H/M-based typing for Q Hi all, James Litsios recently pointed me to this webpage by Nathan Whitehead, a UCSC PhD student who has been working on QT, a dialect/sublanguage of Q with a Hindley/Milner-based type system: http://www.cse.ucsc.edu/~nwhitehe/qt.html The interesting thing is that Nathan's type system offers much more flexibility than basic H/M, which makes it much more suitable for a dynamic language like Q with its ad-hoc polymorphism. From the webpage: "QT adds a nice type system to Q. The additional type system is designed to be as unobtrusive as possible. It supports automatic type inference, higher order types, unconstrainted polymorphic types, and "delayed" evaluation types." Not much additional documentation is available right now, so we'll have to dig into the ML code to find out how it works, but Nathan has promised that he'll write up something to make his work more accessible. It's not clear to me at this point whether his system can be massaged to support the full Q language, but I think it's worth taking a look. What do you think about this? Would adding a more elaborate type system to Q be a wanted improvement? Obviously it might make Q programming a little safer, and type inference might also help to generate faster code in a native code compiler. But there might be drawbacks as well... Cheers, Albert --=20 Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ q-lang-users mailing list q-l...@li... https://lists.sourceforge.net/lists/listinfo/q-lang-users |