|
||
|
|||||||
| Starbucks @ RunUO.com Unmoderated forum for off-topic banter, screen shots, chit-chat and things of this nature. Flames are permitted, and you can pretty much do nearly anything within reason. No advertisements. |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
RunUO Developer/Demise Person
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
|
__________________
Andre Sayre, Core Developer The RunUO Software Team The day we are born is the day Death inches ever closer... E-mail: ASayre ( AT ) RunUO ( Dot ) c o m I'm as graceful as a gazelle galloping over glistening green grass with it's head on fire. |
|
|
|
|
#3 (permalink) |
|
Join Date: Jan 2003
Posts: 134
|
It looks like C# 3.0 is going to be great.
It's nice to see that declarative/functional paradigms are being integrated into a mainstream programming language. I hope this will be just a start. Also I wonder what will be the Java response to that... |
|
|
|
|
#6 (permalink) | ||
|
Join Date: Jan 2003
Posts: 134
|
Quote:
In C# 1.0 you can create delegates that refer to a method by separately defining the method and creating a delegate that points to it. In C# 2.0 you can use an anonymous method, that is you can define the method itself inside the delegate initialization, so that you can avoid some typing and improve readability. In C# 3.0 you'll be able to use lambda expressions, that is to further reduce the amount of stuff you have to write by just typing something like "argument_list => function_body". In its simplest form you can write for example x => x * 2 to consider the function that takes a single argument called x (of a type that is inferred by the compiler using the context in which you use the expression) and returns x * 2. In this form these expressions are syntactically very similar to the expressions used in the lambda calculus (a mathematical system used to formalize algorithm definitions), so I think that the name comes from there. Quote:
Code:
var i = 10; i = "Hello"; i = 0.7; So if you write var i = 10 the compiler will infer that i is an int and will treat it as so. Then if you write i = "Hello" it will be an error. I think that the main reason to add var to the language is to support anonymous types, which obviously have no name and so wouldn't be usable without some construct like var. And I think that the main reason behind anonymous types is the ability to create complex queries with the new query language. |
||
|
|
|
|
#10 (permalink) |
|
Forum Master
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,260
|
Code:
public override void OnPost( Joeku karmahog )
{
Mobile from = TMSTKSBK.mobile;
if ( m_TMSTKSBK.IsNice( from ) )
{
mobile.SendKarmaTo = karmahog;
karmahog.SendMessage( "TMSTKSBK gives you + karma!" );
return;
}
}
![]() |
|
|
|
|
#13 (permalink) |
|
Master of the Internet
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
|
evidently you just got a huge karma - a minute ago O_o...you're two bars now...and like...I'm gonna stop talking about karma. It's a dangerous topic.
__________________
Goodbye, folks. |
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|