It's probably completly discouraged but you can achive something quite close with a "clever", gratious, use of inline.

By on 3/26/2009 2:31 AM ()

It's probably completly discouraged but you can achive something quite close with a "clever", gratious, use of inline.

I love clever, gratious, and discouraged ;) but my imagination fails me here. Example please?

By on 3/26/2009 2:49 AM ()

He was probably referring to the technique mentioned here - [link:www.atrevido.net]

This does not address all the benefits of mixins, but it can be used to add functionality to a class (through new functions). So, if a Mixin is adding features A,B to classes C1 and C2, you could consider writing funcA and funcB similar to "inline speak(..)" in the article.

By on 4/6/2009 6:05 AM ()

I'm pretty sure mixin and trait are both already reserved words in F#. They just don't do anything yet. Try making a variable called mixin or trait and see what happens.

By on 4/6/2009 6:56 AM ()

I'm pretty sure mixin and trait are both already reserved words in F#.  They just don't do anything yet.  Try making a variable called mixin or trait and see what happens.

Heh. Good find. I also found "protected", but that's not news. (not sure if any of this is news, to be honest, but it makes for a nice guessing game :)

By on 4/6/2009 7:23 AM ()

No need to guess, it's in the spec:

[link:research.microsoft.com]

The following identifiers are reserved for future use by F#.

1
2
3
4
5
  token<I> reserved-ident-keyword</I> =
      atomic break checked component const constraint constructor 
      continue eager event external fixed functor global include 
      method mixin object parallel process protected pure 
      sealed tailcall trait virtual volatile 

With the exception of the symbolic keywords such as let! listed later in this specification, the following token forms are reserved:

1
2
  token reserved-ident-formats = 
      | <I>ident-text</I> ( '?' | '!' | '#')

This doesn't mean we necessarily have any concrete plans for these, but we try to be forward-looking and reserve the keywords we may need in the future.

By on 4/6/2009 7:42 AM ()

I love the "pure" one ;)

By on 4/6/2009 9:50 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us
Built with WebSharper