Lambda the Ultimate

inactiveTopic Felix: The power language for C++ programmers
started 9/2/2003; 4:38:12 PM - last post 9/4/2003; 4:21:46 AM
Manuel Simoni - Felix: The power language for C++ programmers  blueArrow
9/2/2003; 4:38:12 PM (reads: 13266, responses: 13)
Felix: The power language for C++ programmers
Felix is new, high power programming language which provides an ML style type system with a syntax that C++ programmers should find easy to learn. It generates C++ and supports both use of C++ types as primitives, as well as embedding in existing C++ written architectures.

Posted to general by Manuel Simoni on 9/2/03; 4:42:56 PM

Chris - Re: Felix: The power language for C++ programmers  blueArrow
9/2/2003; 8:26:12 PM (reads: 1131, responses: 0)
Manuel, how did you discover Felix? felix.sf.net has lots of annotated source code, but no history or credits for the language.

I wish the language was a little more C++-like and less ML, to ease us C++ programmers. It reminds me of Single Assignment C (SAC), a functional language based on C syntax. I think this C/C++ approach (similar syntax and native module support) will be helpful for industry adoption. Java has been very successful as "C++ minus warts plus GC".

Florian Hars - Re: Felix: The power language for C++ programmers  blueArrow
9/2/2003; 10:45:09 PM (reads: 1108, responses: 0)
The caml-list archive contains some background information (by the author) on Felix .

Manuel Simoni - Re: Felix: The power language for C++ programmers  blueArrow
9/3/2003; 12:50:42 AM (reads: 1068, responses: 0)
I was browsing in autopilot-mode when suddenly I stumbled over this comp.lang.python post by Dave Abrahams.

Ehud Lamm - Re: Felix: The power language for C++ programmers  blueArrow
9/3/2003; 7:32:15 AM (reads: 945, responses: 0)
From the examples in the tutorial it seems to me that Felix uses C++ as the target language, but isn't in anyway similar to C++ or familiar.

Bryn Keller - Re: Felix: The power language for C++ programmers  blueArrow
9/3/2003; 8:18:55 AM (reads: 933, responses: 0)
We've discussed Vyper (an earlier Python-like language by the same author, also written in Ocaml) before.

I'll always remember Vyper because it started me down the road of functional programming. I was programming primarily in Python, and stumbled across Vyper, which was supposed to be a more expressive version of Python. Vyper itself never became useful to me, and the author stopped working on it shortly after I discovered it, but it led to other things. Vyper is implemented in OCaml, so that was my next stop. That really introduced me to the functional paradigm, so I continued on to Dylan, Haskell, and others.

Neel Krishnaswami - Re: Felix: The power language for C++ programmers  blueArrow
9/3/2003; 4:03:57 PM (reads: 812, responses: 1)
If John Max Skaller is reading this, I'd like to point him at Andrezj Filinski's master's thesis, Declarative Continuations and Categorical Duality. I was directed to this just last week, and was astonished to discover that it has a nearly note-for-note recitation of the category-theory-related things that JMS talks about when he talks about Felix, especially those related to control flow and the procedure/function distinction.

Ehud Lamm - Re: Felix: The power language for C++ programmers  blueArrow
9/3/2003; 7:53:54 PM (reads: 804, responses: 0)
the procedure/function distinction

I didn't notice this before. I am very much in favour of this distinction (think Ada). I reccall that others here didn't share my enthusiam.

Dan Shappir - Re: Felix: The power language for C++ programmers  blueArrow
9/4/2003; 12:18:46 AM (reads: 754, responses: 5)
I reccall that others here didn't share my enthusiam.

I was one of the others :-) Note that in Felix functions are prohibited from side-effects (except a few selected ones), while procedures are intended for operations with side-effects (otherwise, what is their point ;-) This is a distinctions that languages like Ada don't enforce (disclaimer: I'm no Ada expert, so I could be wrong on this).

You might argue that even the indication to someone reading the code is justification enough, but on that I disagree. Making the distinction between functions and procedures does loose you some functionality or at least flexibility, e.g. related to generics. Code self-documentation just doesn't provide enough compensation for me.

Ehud Lamm - Re: Felix: The power language for C++ programmers  blueArrow
9/4/2003; 12:38:09 AM (reads: 752, responses: 4)
This is a distinctions that languages like Ada don't enforce

True. The language doesn't enforce it, it just encourages it (for example functions can only have "in" mode parameters).

I know it's not perfect, but I much prefer that procedure not appear in expressiosn. For me that's a more improtant factor then wether the language enforces the no side-effect rule.

Dan Shappir - Re: Felix: The power language for C++ programmers  blueArrow
9/4/2003; 1:01:45 AM (reads: 759, responses: 3)
I know it's not perfect, but I much prefer that procedure not appear in expressiosn.

With C/C++ 'procedures' are implemented as functions returning a void 'value'. Given the restrictions on expressions with a void type, many C/C++ programmers don't think of them as expressions at all. Indeed, in my experience few C/C++ programmers use these 'procedures' in expressions, at least not explicitly.

The fact that void is a type which can participate in an expression does allow intermixing of functions / procedures in C++ generics. Whether or not this is a good thing is obviously a matter of personal taste.

Ehud Lamm - Re: Felix: The power language for C++ programmers  blueArrow
9/4/2003; 2:16:01 AM (reads: 769, responses: 2)
Well, C is not the only language around (and I still view voiad as a recent addition to the language...). In a recent thread we saw an example of the kinds of problems that can arise, when y=sort(x) is valid, and simply kills y, instead of assigning the sroted x.

Dan Shappir - Re: Felix: The power language for C++ programmers  blueArrow
9/4/2003; 4:12:48 AM (reads: 758, responses: 1)
Actually y=sort(x) won't work for sort() that returns void because you can't declare a variable of type void, nor can you assign a void 'value' to a variable of some other type. I'm talking about C/C++ of course.

Also, as I recall, the discussions were about whether x.sort() should sort x or return a sorted copy. And if x.sort() does sort in place what value, if any, should be returned.

As I recall the problem was Python returning null for that operation. For a ST PL this is almost a non-issue.

Ehud Lamm - Re: Felix: The power language for C++ programmers  blueArrow
9/4/2003; 4:21:46 AM (reads: 776, responses: 0)
I think I made it clear that I wasn't talking about C/C++. I guess we simply agree to disagree on this one..