- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
documentation for structural/partial type bounds
Thu, 2009-03-05, 00:27
Dam and Sir Scalahads,
Where is the documentation for the structural/partial type syntax? i want to express a bound on a type that says it has to at least have method m with signature sig.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Where is the documentation for the structural/partial type syntax? i want to express a bound on a type that says it has to at least have method m with signature sig.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thu, 2009-03-05, 01:07
#2
Re: documentation for structural/partial type bounds
David,
Thanks!
Best wishes,
--greg
On Wed, Mar 4, 2009 at 3:46 PM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thanks!
Best wishes,
--greg
On Wed, Mar 4, 2009 at 3:46 PM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
scala> def doClose(in: {def close(i: Int): Unit}) {in.close(42)}
doClose: (AnyRef{def close(Int): Unit})Unit
On Wed, Mar 4, 2009 at 3:26 PM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
Dam and Sir Scalahads,
Where is the documentation for the structural/partial type syntax? i want to express a bound on a type that says it has to at least have method m with signature sig.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thu, 2009-03-05, 01:17
#3
Re: documentation for structural/partial type bounds
What surprised me recently is that you can use these in asInstanceOf:
x.asInstanceOf[ {def aMethod(i: Int): Unit} ].aMethod(888)
Interesting way to do reflective calls...
On Thu, Mar 5, 2009 at 12:48 AM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
--
ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ı ǝɯıʇ ʇsɐן ǝɥʇ sı sıɥʇ
x.asInstanceOf[ {def aMethod(i: Int): Unit} ].aMethod(888)
Interesting way to do reflective calls...
On Thu, Mar 5, 2009 at 12:48 AM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
David,
Thanks!
Best wishes,
--greg
On Wed, Mar 4, 2009 at 3:46 PM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
scala> def doClose(in: {def close(i: Int): Unit}) {in.close(42)}
doClose: (AnyRef{def close(Int): Unit})Unit
On Wed, Mar 4, 2009 at 3:26 PM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
Dam and Sir Scalahads,
Where is the documentation for the structural/partial type syntax? i want to express a bound on a type that says it has to at least have method m with signature sig.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ı ǝɯıʇ ʇsɐן ǝɥʇ sı sıɥʇ
Thu, 2009-03-05, 01:27
#4
Re: documentation for structural/partial type bounds
On Wed, Mar 4, 2009 at 3:54 PM, Szymon Jachim <sjachim@gmail.com> wrote:
What surprised me recently is that you can use these in asInstanceOf:
x.asInstanceOf[ {def aMethod(i: Int): Unit} ].aMethod(888)
Holy frickin' cow... that's cool
Interesting way to do reflective calls...
On Thu, Mar 5, 2009 at 12:48 AM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
David,
Thanks!
Best wishes,
--greg
On Wed, Mar 4, 2009 at 3:46 PM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
scala> def doClose(in: {def close(i: Int): Unit}) {in.close(42)}
doClose: (AnyRef{def close(Int): Unit})Unit
On Wed, Mar 4, 2009 at 3:26 PM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
Dam and Sir Scalahads,
Where is the documentation for the structural/partial type syntax? i want to express a bound on a type that says it has to at least have method m with signature sig.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ı ǝɯıʇ ʇsɐן ǝɥʇ sı sıɥʇ
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
doClose: (AnyRef{def close(Int): Unit})Unit
On Wed, Mar 4, 2009 at 3:26 PM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp