On Mon, Feb 28, 2011 at 6:26 PM, john skaller
<[email protected]> wrote:
> I have to abandon this, it's a bit tricker than I thought.
Aww, that's too bad. I love the idea.
> Records are sorted for example.
I thought that was more of an implementation detail. We could provide
along a name-position index and just do the shuffling at the callsite.
Or we could say we lexicographically sort all structures. As long as
we aren't committing to an ABI I think it'd be safe to do either.
> Also, structs can be polymorphic: this would be tricky to represent..
> basically not possible.
>
> For example:
>
> struct X[T] { x:T; };
>
> Now, there is no way to have polymorphic values (only types can be
> polymorphic).
> So actually here there's be a polymorphic type alias:
>
> typedef X[T] = struct X { x:T; };
>
> Anyhow the main difficulty is that tuples are everywhere and the way they're
> handled is different from records. In particular records have had less work
> done
> on them so can't do as much. Unification would have fixed that but the
> problem now
> is that there's a huge job to do making sure records with all blank fields
> act exactly
> as tuples used to. The easiest way to do that is keep the BTYP_tuple
> combinator
> which defeats the exercise :)
>
> I think this needs to be done, but its not a priority at the moment (I just
> thought it
> would be reasonably easy but it turns out to be a pain).
Could you throw this up in https://github.com/felix-lang/felix/issues
for the future? It's still a great idea, even if it's going to be
difficult to do.
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language