Forums

Moving to .Net 4.0

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Moving to .Net 4.0

Postby hopscc » Mon May 27, 2013 5:50 am

C# .Net 4.0 has some additional goodies that Cobra may benefit from.
Is there an intention of enhancing cobra for these?

We already have type inference and late binding with a ticket/note for supporting (or using) the .Net 4.0 code for that
i.e var and dynamic - see ticket:319.

The obvious ones not covered yet are
  • Optional Parameters (default parameter values)
  • Named Parameters
  • Variance (maybe - probably just augmenting syntax support)
  • I think simpler COM interop should just fall out of the update....

see C 4.0s New Features Explained
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: Moving to .Net 4.0

Postby Charles » Mon May 27, 2013 12:01 pm

Sure. Also:

* Generate C# lambdas for Cobra lambdas
* Generate C# property initializers for Cobra property initializers
* Switch Set<T> to inherit from HashSet<T>

And we're still behind on not binding to C# extension methods which is probably the #1 pain point among all of these.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Moving to .Net 4.0

Postby Charles » Mon May 27, 2013 12:03 pm

Btw, for everyone's info, after the last release, I bumped Cobra to .NET 4.0 in the repository.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Moving to .Net 4.0

Postby hopscc » Mon May 27, 2013 10:53 pm

Maybe set these up as two tickets/task groups
One for things that cobra already does but Net 4.0 now has things to support better - codegen changes in other words
  • Use 'dynamic' dcl for cobra dynamic Type
  • use '''var''' for type inference (where necessary) ??
  • Generate C# lambdas for Cobra lambdas
  • Generate C# property initializers for Cobra property initializers
  • Switch Set<T> to inherit from HashSet<T>

Another for overt changes that need changes/augmentation of cobra language itself (as well as codegen)
  • Optional Parameters (default parameter values)
  • Named Parameters
  • Support Net 4.0 Variance


Change ticket:319 to something like 'Change codegen to use 4.0 capabilities' for the first group
or would you rather them each pulled out as separate items?

Whats the ticket#/description/discussion topic for the 'not binding to C# extension methods' ?
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: Moving to .Net 4.0

Postby gourD » Tue May 28, 2013 6:35 am

Charles wrote:Btw, for everyone's info, after the last release, I bumped Cobra to .NET 4.0 in the repository.


In Mono FAQ I read the following:

The Mono API today is somewhere in between .NET 2.0 and .NET 4.0...


Does the move of Cobra to .net 4.0 mean that Linux users will degrade into some lower status? :?
gourD
 
Posts: 40
Location: Hlapičina (Croatia)

Re: Moving to .Net 4.0

Postby Charles » Tue May 28, 2013 11:20 am

hopscc wrote:Change ticket:319 to something like 'Change codegen to use 4.0 capabilities' for the first group
or would you rather them each pulled out as separate items?

Whats the ticket#/description/discussion topic for the 'not binding to C# extension methods' ?

Separate tickets would be better.

I don't see a ticket for binding to C# extension methods.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Moving to .Net 4.0

Postby Charles » Tue May 28, 2013 11:21 am

gourD wrote:
Charles wrote:Btw, for everyone's info, after the last release, I bumped Cobra to .NET 4.0 in the repository.


In Mono FAQ I read the following:

The Mono API today is somewhere in between .NET 2.0 and .NET 4.0...


Does the move of Cobra to .net 4.0 mean that Linux users will degrade into some lower status? :?

Typically what comes in late are more obscure parts of the API. I don't think we'll have any problems.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Moving to .Net 4.0

Postby hopscc » Wed May 29, 2013 5:01 am

OK I'll open some tkts for .Net 4.0 support work.

Theres 5 tickets for extensions, do any of them apply to the 'binding to C# extn methods' you mean ?

130: The compiler doesnt find the closest Extension method
1: Extension methods and properties
26: Recognize extension methods in dynamic binding
146: bug when adding an extension method that is an overload of a BCL class
145: Complete the collection of string.split extension methods

If not can we get a ticket ( or expand one of the existing ones) describing what the issue is?
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: Moving to .Net 4.0

Postby Charles » Wed May 29, 2013 4:12 pm

Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Moving to .Net 4.0

Postby hopscc » Thu May 30, 2013 5:36 am

Good O.

ticket:324 - ticket:330 are for tasks for support work identified to date.
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Next

Return to Discussion

Who is online

Users browsing this forum: No registered users and 16 guests