From: Nat Pryce Date: 2002-08-22T20:28:07+09:00 Subject: Re: What New Language After Ruby? On Wed, 2002-08-21 at 16:52, William Djaja Tjokroaminata wrote: > Thanks for the pointers. Uh oh, this year's language is Haskell. I am > sorry for broadening the question. For people who have used Ruby and have > understood Haskell, is Haskell really practical (i.e., we can use it in > our daily professional work), or is it more interesting as just a mind > exercise? In particular, is it possible to combine Haskell and C (and > therefore Ruby, C, and Haskell)? Haskell has a good library for processing XML. In fact, functional languages are ideal for applications that translate documents between different formats -- such applications are basically just tree transformations. That's why DSSSL and XSL borrow a lot of concepts from functional languages. However, the LoTY exercise is not meant to be purely practical. In my experience, learning a new language introduces you to new ideas about programming itself, and you can then apply that new understanding in the everyday languages one uses in every day work. For example, among other things, Haskell demonstrates that: 1) A static type system, if done properly, does not have to be restrictive, and doesn't need "escape holes" such as casts. 2) Lazy evaluation is a powerful mechanism for modelling "infinite" data structures. Haskell can do this without special language constructs such as Python's generators, or explicit coding of laziness. 3) How to structure programs using higher-order functions. Points 2 & 3 can be applied to everyday languages, such as Java or Ruby, with a little work. Point 1 will, unfortunately, increase your dislike of Java, but won't affect your love of Ruby! > Someone pointed me to Lua before, and he has combined Ruby, C, and > Lua. Has Lua been considered before? Or Lua is just too simple? Lua is a very simple, I'd go so far as to say *simplistic*, language. I don't think its different enough from Ruby to be worth learning, unless you actually have to use it in practice. Ruby does everything that Lua does, only Ruby is more elegant and more expressive. Cheers, Nat. -- Dr. Nathaniel Pryce, Technical Director, B13media Ltd. Studio 3a, 22-24 Highbury Grove, London N5 2EA, UK http://www.b13media.com