On Sun, 2006-09-10 at 00:50 -0400, Peter Tanski wrote:
> On Sep 8, 2006, at 9:49 PM, skaller wrote:

> Regarding C++ template type notation, why did you choose square  
> brackets for the list of predicates, instead of angle brackets? 

Because < and > are comparison operators?

> > But -- and you must promise not to scream here -- the
> > 'most important' use of typeclasses is actually to automate
> > wrapping C++ types. In this case 'the whole point' is
> > in the defaults:
> >
> > typeclass Iterator[i,t] {
> >    proc advance: i = "++$1";
> >    fun deref: i -> t = "*$1";
> >    fun eq: i * i -> 2 = "$1==$2";
> > }
> >
> > This is actually the very first thing I want to do :)
> 
> That's a great way to start!  To clarify, you want to be able to  
> create a general typeclass with default definitions, then derive  
> instances of that typeclass for each C++ type you want to import to  
> Felix?

Almost. Replace 'each C++ type' with 'each C++ template':
for example and instance for vector<T> .. ONE instance
statement, not one for vector<int> and another for 
vector<float>.

> > and one is very tempted to rip off Haskell and allow
> >
> >     a `add` b
> >
> > if only we weren't so short of punctuation :)
> 
> What punctuation does `add` cover?

It uses up the last free quote mark, backtick (`)

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


-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to