Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion Boo comments
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rodrigo B. de Oliveira  
View profile  
 More options Sep 15 2006, 12:36 pm
From: "Rodrigo B. de Oliveira" <rodrigobam...@gmail.com>
Date: Fri, 15 Sep 2006 13:36:35 -0300
Local: Fri, Sep 15 2006 12:36 pm
Subject: Re: Boo comments
On 9/14/06, Avish <some.av...@gmail.com> wrote:

> ... Could you guys use any help from a
> Boo-novice (but skilled C#-er)?

Sure, here are a few ideas for exploration:

1) Generic instance for internal types - test case:

    import System.Collections.Generic

    class Person:
        [property(Name)] _name = ""

    l = List of Person()
    l.Add(Person(Name: "Eric Idle"))
    assert "Eric Idle" == l[0].Name

Currently this will trigger an internal compiler error in
ExternalGenericTypeDefinition.MakeGenericType. The solution is to
implement a new IType class, GenericTypeInstance, which can behave
like an instantiated generic type (this will also trigger need for
GenericMethodInstance, etc...).

2) Type inference for IEnumerable of T:

     import System.Collections.Generic
     ints = List of int()
     ints.Add(21)
     for i in ints: # compiler should infer i as int
           print i*2

3) Generic type references:

     import System.Collections.Generic
     def foo() as IEnumerable of int:
        return (1, 2, 3, 4)

4) Generic generators:

     def ff() as IEnumerable of int:
        yield 1
        yield 1
        yield 2

5) Generic callable instantiation:

     function as ParameterizedThreadStart of int
     function = { i as int | print i*2 }
     Thread(function).Start(21)

     and then more simply:

     Thread({ i as int | print i*2}).Start(21)

6) Implementing generic interfaces

7) overriding generic members

8) defining new generic types

I'm focusing more on language extensibility lately, trying to finally
get a somehow unified and easy to use macro system out of my brain.

--
bamboo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.