Hi, I've been slowly working my way through the tutorial and reference manual and I've come up with a long list of questions and comments from a language-design point of view.
- Redundancy - It seems Felix has a few redundant syntactic constructs, which is to be expected since it is heavily under development. But I was wondering which of the following constructs are "preferred" (if they are indeed identical), and if any are deprecated: * At a first glance namespaces seem to be a superset of modules... is there a reason they coexist? E.g. is the lack of extendability of modules considered beneficial in some cases? * Do jump and loop always perform the same optimizations? I.e. do they coexist solely for documentation purposes? * Can first-order polymorphism accomplish anything that metatyping can't? It seems that polymorphism could be implemented as sugar for a simple type function. * Is there a difference between objects and classes? * val vs. :=, enum vs. union vs. C-union...? - Syntax - These questions are probably answered somewhere in the tutorial but I can't seem to find them: * Is there a way to alias patterns? E.g. (?x, ?y as ?xy)? * Is there a way to write a literal of type char? * How can one write a value of type a^0 or a^1? - Bugs - * The example for the loop statement in section 2.40 of the tutorial works with jump, but not with loop. * f"%s" expects a C_hack::ptr[char], but it should probably expect a C_hack::cptr[char] since it doesn't modify its argument. On a similar note, is there a format specifier for a string so one can avoid cstr()? * It seems that vals don't have to be initialized... is this a bug? (Especially since there is no way to assign anything to them afterward...) - Documentation - I found a few inconsistencies in the docs, if you like I could fix them myself and submit a patch: * The docs don't make it clear that types & variables share the same namespace. * $ is never formally introduced (although it is used a lot). * The docs say that "unlike functions, procedures may have side effects"... does this actually mean that procedures are guaranteed to be evaluated for side effects, whereas functions are not? * Section 2.29 of the tutorial says that procedures produced from HOFs are not called when the () is elided when in fact they are. * Section 6 of the tutorial, GLR parsing, looks like it contains some sections it shouldn't. * forall is introduced as sugar for for, but for is never introduced. - Theory - * I like that Felix has lightweight anonymous structs; using objects in O'Caml for that purpose always seems like overkill to me. On the flip side, does Felix have anonymous unions? I.e. something equivalent to O'Caml's polymorphic variants? * It seems to me that in Felix neither objects nor classes support subtyping. Am I missing something? Or is the plan to outright replace objects and classes with typeclasses (which would be awesome)? Sorry for the long e-mail... I think Felix is a fascinating language and has great potential, or else I wouldn't nitpick so much :) - Chris ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language