• roslyn mimarisi üzerine kurulu olacak ve visual studio 2013'ten sonra çıkacak visual studio ile gelecek c# sürümü. c#'ın nihayet scala ve f# gibi dillerin immutable object kullanım rahatlığına ulaşacağını düşünüyorum zira müjdelenen yenilikler arasında:

    - auto read only properties (initial value'ya sahip readonly property'ler)
    - property/method expressions (method'u dogrudan lambda expression olarak declare edebilme)

    gibi özellikler immutable object elde etmeyi ve genel olarak class yazımını acayip kolaylaştırıyor.

    immutability kullanımı da oop tasarıma dönüştürme sürecinde peydahlanan mutability'nin yol açtığı problemlere engel olup potansiyel bug'ları da çıkmadan yok ediyor. state'in karmaşıklaşmasına engel oluyor.

    edit: primary constructor da vardı planda sonradan vazgeçildi ben de listeden çıkardım.
  • ilk saydığım kritik yenilikler dışında da dilin kullanımını kolaylaştıracak enfes yenilikler geliyor:

    - array yerine ienumerable ile çalışan params. ne sağlıyor: true immutability, dolayısıyla thread-safety vs.

    - nameof operatörü.

    - daha kolay dictionary initialization sözdizimi. örn:

    new dictionary<string,string>() { { "key1", "value1" }, { "key2", "value2" } }

    yerine

    new dictionary<string,string>() { ["key1"] = "value1", ["key2"] = "value2" }

    - bir static class'ın üyelerini namespace'te varsayılan üyeler kılabilmek. örn:

    using system;
    console.writeline();

    yerine

    using system.console;
    writeline();

    - exception filtreleri: bu c# 6.0 öncesinde mümkün olan bir şey değildi. bir exception'ı sadece belli koşullar uyarsa yakalamanızı sağlıyor. örn:

    catch(exception e) if (e.message == "abv") {
    ...
    }

    - null propagating operator: örn:

    var nesne = fonksiyon();
    string deger = null;
    if (temp != null)
    {
    var altdeger = nesne.altdeger;
    if(altdeger != null && altdeger.x != null) deger = altdeger.x;
    }

    yerine

    string deger = fonksiyon()?.altdeger?.x?;

    - constructor'larda type inference. örn:

    new tuple<string, int>("a", 123);

    yerine

    new tuple("a", 123);
  • c.$name = c.$first + " " + c.$last; denen iğrenç sözdizimini çıkarmışlar projeden acayip sevindim. tek beni rahatsız eden noktası oydu.
  • primary constructors özelliğini de çıkarmışlar projeden.

    feature example c# vb
    "primary constructors" "class point(int x, int y) { … }" no no
    https://roslyn.codeplex.com/…ingtitle=documentation

    açıklama da şöyle:
    hi all,

    as we enter the final stage in our long quest to renew the c# and visual basic experience, we’ve had to make some tough decisions around the set of language features that will make it into the next version of the languages.

    these decisions are primarily based on cost vs. risk. some of the features you’ve seen in the previews still need a lot of downstream work to be supported in the ıde, debugger, etc., and also to get to great quality in the compiler itself.

    as you’ve maybe heard me say before, language features are a secondary consideration in this release. the primary goal is to deliver a magnificent first release of the roslyn value proposition: deep language understanding in the ıde and available to everyone through a robust and comprehensive apı. to deliver this well, we need to scale back our appetite for language features a bit.

    the features we are cutting are:
    primary constructors in c# (along with initializers in structs)
    declaration expressions in c# / out parameters in vb
    they are both characterized by having large amounts of downstream work still remaining. they are also features that we see as the potential beginning of a bigger story further down the line: primary constructors could grow up to become a full-blown record feature, and declaration expressions would form the corner stone of pattern matching and deconstruction facilities. now, those features will all be considered together for a later release. as a silver lining we then get to design this continuum holistically, rather than in steps that might tie our hands unduly in a later phase.

    all that said, ı am sad to let these features go, and ı know that goes for many of you as well. you’ve provided amazingly valuable feedback on both these features, and those learnings will feed directly into our future design work. ı cannot thank you enough for this incredible engagement! ı also hope you’ve enjoyed seeing more of the “inner workings” this time around, even if it leads to disappointment when you watch things come and go in our plans. your increased involvement has certainly been rewarding for us, and – we hope! – helped improve the quality and timeliness of our decisions.

    there’s a bit of good news too: string interpolation (which hasn’t been previewed yet) is currently looking to make it in. you should see that one show up first in c# (where we’ve already prototyped our approach), and a little later in vb.

    thanks again!

    mads
    http://roslyn.codeplex.com/discussions/568820
  • declaration expression denen garabetin gitmesine sevindim. out kullanımını cesaretlendiren her yapı gitmeli. bunların sonradan record* ve pattern matching gibi yapılarla geri getireceklerini duymak da güzel. daha doğru.

    ama primary constructor beni çok mutlu edecekti. üzüldüm baya. tam da şurada ağzımın suları aka aka okurken:

    http://msdn.microsoft.com/…&type=zmagz&country=zusz
hesabın var mı? giriş yap