Pharan

So I was watching a video of a //build 2014 talk about C#.
I knew they were open-sourcing the C# compiler and stuff but I didn't really know the details of what else was new.
Apparently, teally cool stuff.

The new language features of the latest C# spec are really awesome. Makes code so much easier to browse through.
But it's too bad Unity Tech will probably be dragging their feet to update their compiler (and runtime?).
Hopefully, MS's closer relationship with Xamarin will nudge development in our favor.

I do seriously hope those language features are mostly just on the compiler side.

On a related note, this may sadly mean Spine-C# needs to stay as it is for a while longer.
Sad, sad, sad.
Avatar
Pharan
  • Postovi: 5366

Nate

Got a link to new C# features?

I heard something about Unity forking Mono which makes it difficult for them to update.

I'm not really happy with C#, Java or the other languages available. :( Java comes closest for me though.
Avatar
Nate

Nate
  • Postovi: 11846

Pharan

Whoa whoa whoa. No way, Nate.

C#?
User-defined value types? (struct)
Compile-time interpreted variable declarations? (var)
Properties? Auto-implemented getters and setters?
Delegates and Events?
Extension Methods?
Anonymous Methods?
The option to use unsafe code? (pointers and things like C/C++?)
Named parameters? ( DoSomething(width: 10f); )


AND NOW THIS: http://damieng.com/blog/2013/12/09/prob ... llustrated
(I couldn't find the official list. This was the simplest I could find through Google. xD)
see Primary Constructors and Monadic Null Checking/Null Propagation
I mean, how wonderful would it be to skip all the if(object != null) if(object.ownedobject != null) something.
and just say object?.ownedobject?.something :D

The video said their focus was reducing boilerplate and repetitive stuff, minor language features that they've held off because they focused on major features.
Avatar
Pharan
  • Postovi: 5366

Nate

C# certainly has some neat stuff. It also has a lot of stuff, maybe too much (LINQ or some such). Keeping things simple is one of the things Java did well (though maybe too simple :) ). Adding more and more to a language isn't necessarily a good thing, on many levels.

One of the advantages Java has is that its IDE support is really good.
Avatar
Nate

Nate
  • Postovi: 11846

Pharan

lol. Yeah, LINQ is controversial. TOO BAD JAVA IS GETTING IT TOO. XD

I think it was just a bone thrown for all the servery things and business applications C# is used for. (or potentially used for?)

I don't think C# has too much though.
Its consumption of keywords and syntax haven't been a bother. (me coming from Java and C)
And I certainly appreciate the things that make the code more big-picture-readable by making more concise and more self-documenting.
And maybe just personally, I liked the feeling of discovering some unexplored parts of C#. I guess it wasn't that much different from my experience of learning about function pointers in C. haha
I guess when you're a person who has to learn or use a lot of languages, the bigger language is less attractive to get into.

But yeah, I can see where adding too much stuff to a language can get out of hand, and where being a small language has benefits.

Speaking of languages that get added to, have you seen the C++14 spec? lol
I have no wish to return to the land of arrows and ampersands, but that stuff is pretty neat too. Seems like the C family wants shorter and shorter code. You know it has a foreach and automatic disposal now? AMAZING. :D
Avatar
Pharan
  • Postovi: 5366

Magnesus

I liked C# in the beginning when it was as simple as Java. Now... it's a huge cow with too many features beginning to look like C++ (which I like but it's another story).
Magnesus

Kickstarter Backer
  • Postovi: 111

Pharan

In other news, it looks like Unity's possibly going to move to the Roslyn compiler, post-Unity 5.
http://blogs.unity3d.com/2014/05/20/the ... -in-unity/

Maybe.
At the very least, they're finally moving along.

or one can dream.
Avatar
Pharan
  • Postovi: 5366


Natrag na Off-topic