On Thu, 2007-11-08 at 01:06 +0000, Aaron Gray wrote:
> John,

Also posted to list, hope that's ok .. the info might be useful.

> A programmer friend and I attempted to go through your Felix tutorial, but 
> failed to get past 2.24, his words where, "spectacularly bad examples", and 
> "Units where as clear as mud". Sorry about this but your examples are very 
> hard to differentiate what is going on.

The tutorial is also regression test suite. A lot of the
examples were just added quickly without much text.
Compiler is a big job .. lack of resources.

> 2.8 whats going on with unspecified return types, do they return a variant, 
> or are they statically bound, bringing in possible link time problems if 
> returned expressions are modifed in type.

Same as C++ 'auto' feature: the compiler calculates the return type:

        fun f(x:int)=>x; // fun f(x:int):int=>x;

        fun f(x:int)={ return x; } // as above, returns int

Same as for variables:

        var x = 1; // var x:int = 1

> 2.12 Unit is still very hard to pin down.

Unit is a type with exactly 1 value. It is the same as

        struct {}

in C.

>  (1+1+1) notation is very odd and 
> not properly explained within this context.

Sum types are hard to understand for C/C++ programmers.
Sums are basically a discriminated union. The 1+1+1 stuff
is an anonymous sum which appears to be unique to Felix.

> 2.10 Indexing notation is odd why not use square braces without period.

I agree it's a pain. The problem is Felix uses

        list[int] // would be list<int> in C++

for generics. Polymorphism is vastly more important than arrays.
We can't use <> for generics because < > are less/greater operators.
To use < > I'd have to change less/greater to say .< .> 

The notation has to be un-ambiguous: something has be changed.
I picked arrays .. I'd be happy to see any other plan.

> 2.15 totally unclear

Yes, it is a stub (incomplete placeholder article).

> 2.21 iterators not explained

True.. they're just char* .. i.e. like STL iterators.

> 2.22 closures not explained

How do you know function values are closures .. they're not
mentioned by that name on that page :)

> 2.23 useless examples, almost equivalent examples without differentation.

Yes, the example is minimal rather than useful.

> Thats as far as we got, Rob quit partly due to time but mainly due to bad 
> examples.

It's quite hard to present features sequentially and still
write useful examples .. without using features that haven't
been introduced yet.

> As far as I am concerned it looks quite good, with alot of the language 
> features that I want in a language. I think that if things were explained 
> better Rob would have been happy to spend the time looking at it.

I agree: but I have to trade-off time working on the compiler,
libraries, reference, tutorial .. etc etc..

It's a chicken and egg problem.

Right now, I'm de-literate-programming all the C++ code,
even though this degrades the build system, because the 
literate programmed form is an obstacle for C/C++ programmers
that are more used to editing C/C++ files directly:
more people are needed to write library code.

The thing here is that people want something that is ready to go:
nice tutorial examples, working compiler, useful libraries, etc.

But I cannot construct all of that myself. I've focused on
the language core in the hope of inspiring enough people
that they would join the team and do some of the work.

> If you could address these issues you may get more interest from me and 
> possibly from Rob. There is no substitute to clear examples and explanation.

No dispute.

> I have yet to look at your code, I am not familuar with O'CAML though, looks 
> like a good time to learn it or part of it at least.

Sure .. but don't use my Ocaml code as a good example!

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to