[NEWBIE] Guards

50 views
Skip to first unread message

Bruce Axtens

unread,
Apr 2, 2015, 3:29:52 AM4/2/15
to yeti...@googlegroups.com
Some of you may have come across Nils M Holm's rather idiosyncratic ML dialect, mLite <http://t3x.org/mlite/index.html>. Of the things it offers one which rather piqued my interest is "... guards ..." One of Holm's examples of this is in an iota function:
;; create lists of numbers
fun iota (a, b) where (a = b)
                = [a]
       | (a, b) = a :: iota (a + 1, b)
       | a      = iota (1, a)

Doubtless there is an ML standard that one is desirous to adhere to. Are guards too serious a divergence from that standard to be considered in yeti?


Bruce Axtens, aka bugmagnet.

Madis

unread,
Apr 2, 2015, 3:53:07 AM4/2/15
to yeti...@googlegroups.com
The case pattern matching implementation in compiler should be rewritten
before adding any new features to it (exhaustiveness checking is broken
and the generated code is not optimal). Currently I'm mostly using the
limited free time to write the reference manual/language specification,
because I still want to do the 1.0 release and it's a bit funny to call
it 1.0 without having a real description of the language. It seems that
having family isn't good for free software. ;)

The ML standard is not a problem, as Yeti doesn't adhere it anyway.
It's semantics and type system are similar to ML (more like OCaml than
SML), but syntax is quite different.
Reply all
Reply to author
Forward
0 new messages