-----------------------------------------------------------

New Message on cochindotnet

-----------------------------------------------------------
From: spark
Message 1 in Discussion


Hi guys, I am really 
really excited about this .. discovery :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbconCProgrammingLanguageFutureFeatures.asp
this paper dicusses 
c# language enhhgancements.
 
while i had \, like 
many of you, seem this a long time back - i didnt give it its due unitl i saw 
something on miguel de icaza'a blog today. c# is going to support iterators - 
more specifically it is going to support 'yield' as in ruby.
 
for a while i have 
been talki ng to folk about my pet language called ruby - one of teh most 
exiting things about ruby is the existence of an iteration operator called 
yield. this is rather different in concept to anything other languages have to 
offer and was a good enough sigle reason to use ruby as a 
language.
also i beleievd that 
it was very hard if not impossible for a stack based langauge to implement a 
'yield'. 
 
this is a ruby 
example
# i declare a 
function here that prints a value and yields the values i*2  = 
0,2,4,6...
def 
myfunction
    10.times {|i|
        print 
"value of 2 * i  = "
        print 
i*2
        yield 
i*2
    }
end
 
# i call the 
function here 
myfunction 
{|n|
    
print "value of n = "
    
print n
}
 
yield gives you a 
mechanism to return values from a function without the function actually 
exiting. The value returned can be processed by the calling function and then 
the called funtion will continue !!!
 
this is the url to 
miguel's blog: http://primates.ximian.com/~miguel/activity-log.php
 
rosh
 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/cochindotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to