News for hackers. Stuff that matters.
Re:Microsoft takes .NET open source and cross-platform by brodo on Wednesday November 12, 2014 @12:08PM (#8596656)
In Scala, there are just too many ways to do things. It's optimized for flexibility and easy writability. C# on the other hand may be a little more verbose, but at least everyone can read everyone elses code.
Re:Microsoft takes .NET open source and cross-platform by ffreire on Wednesday November 12, 2014 @01:11PM (#8597108)
IMHO this works to Scala's detriment. I very much enjoy Python and Clojure precisely because they have one, generally accepted way of doing things. Is it a silver bullet? Of course not, but this works for me 9 times out 10 and I find that coming back to my code later (or sharing with colleagues) is far easier because most code will be structured in a familiar way and therefore take less time to understand the unique bits that solve the problem at hand.
Re:Microsoft takes .NET open source and cross-platform by moonchrome on Wednesday November 12, 2014 @03:25PM (#8597905)
Actually that's the one thing that's driven me away from Clojure.

I love the simplicity behind the language and it makes simple things actually simple - which isn't as trivial as it sounds. But once you start dealing with complex things in Clojure the language doesn't do much for you, if you can't fit your problem in to it's provided toolkit the code written will actually be horrible - for example go look at core.async [1] implementation - just reading that code gives me a headache - I understand it's complicated stuff with buffering and all but having type annotations on protocols and variables used would be extremely helpful when trying to parse that code. Types help me think more abstractly when I'm reading the code as I can take them as compiler enforced contracts and think of them in abstract terms, in dynamically typed languages complexity and the amount of things you need to be aware of is just too overwhelming IMO.

[1] https://github.com/clojure/core.async/blob/master/src/main/c...

Re:Microsoft takes .NET open source and cross-platform by nickik on Thursday November 13, 2014 @08:41AM (#8601413)
I think the nice thing is that you can start without types and add them later, staticlly or with dynamic checks. First I play around with data, once I know what I want I can write some schema annotation.

You can activate validation for everything in development and then in productive only activate validation on your api endpoints. In a future version, you will probebly be able to generate core.typed stuff directly from schema.

Other then that, I think extreamly high performace code a la core.async is not the norm, there the types are not used for the programmer, but rather for the VM. I have used type hints in the last couple of years maybe, one or twice.

Re:Microsoft takes .NET open source and cross-platform by moonchrome on Friday November 14, 2014 @04:20AM (#8606386)
I think you misunderstood what I was trying to say - core.async has no type annotations, you cant even figure out what the protocols are supposed to do because there is no documentation and no types - you literally have to find places its used and reverse engineer protocol semantics. And the function I linked to is very hard to keep track of - a large part of that is inherent with synchronization/buffering logic being complex but the language does nothing to make the code simple or easy to read - I'd bet that function would be easier to understand in Java than in Clojure.

I've tried core.typed, it's amazing in theory but in practice it's unusable (at least for me) and nobody annotates their code anyway. If core.typed becomes more widespread in Clojure community I might actually give it a second chance, in the mean time I'm just going to use Kotlin for JVM, it has transparent Java interop and reduces the Java noise, and the tools (IDEA) is infinitely better than anything I've seen in Clojure land.

Re:Microsoft takes .NET open source and cross-platform by taylorlapeyre on Wednesday November 12, 2014 @02:11PM (#8597502)
Clojure is my favorite language by far, but there's hardly "have one, generally accepted way" of doing everything.
Re:Microsoft takes .NET open source and cross-platform by saosebastiao on Wednesday November 12, 2014 @12:27PM (#8596783)
Funny, I find c# much harder to read. Its almost as if it is easy to understand code for languages you know well, and harder to understand code for languages you don't.
Re:Microsoft takes .NET open source and cross-platform by jbooth on Wednesday November 12, 2014 @12:47PM (#8596928)
You find C# harder than this?

trait SeqLike[+A, +Repr] extends Any with IterableLike[A, Repr] with GenSeqLike[A, Repr] with Parallelizable[A, ParSeq[A]] { self =>

or

def :+[B >: A, That](elem: B)(implicit bf: CanBuildFrom[Repr, B, That]): That

Re:Microsoft takes .NET open source and cross-platform by ssmoot on Wednesday November 12, 2014 @03:42PM (#8598017)
If you want to make a compelling argument to anyone that actually knows Scala, you need to drop the idea you can make it with scala.collections. Find another altar. This is a complete non-issue for the day-to-day Scala developer.

Outside of some pretty extreme examples (scalaz maybe), I don't think I've actually ever seen someone else's source that implemented a custom collection.

And you're purposefully trying to confuse people by digging into what might as well be "internal" signatures.

What do the actual, official docs say about SeqLike :+ ?

  > def :+(elem: A): Seq[A]
  > [use case] A copy of this sequence with an element appended.
Oh wow. Why does that look so much simpler than what you posted? Could it be you're exaggerating for effect and disingenuously implying that Scala developers will be routinely faced with the challenge of trying to parse such signatures? Of course you are.

Can you dig down further and find the CBF signature? Yes. Do you need to for anything outside of spreading FUD? Nope. Is it a bad thing that it shows how the sausage is made underneath the covers? I don't think so.

Re:Microsoft takes .NET open source and cross-platform by jbooth on Wednesday November 12, 2014 @03:58PM (#8598114)
Personally, I view the collections library as a showcase for how that language works when you're designing an API to be used for 3rd parties. If it's incomprehensible, that worries me.

If the collections API is purposely trying to confuse people, blame the Scala team, not me.

Re:Microsoft takes .NET open source and cross-platform by ssmoot on Wednesday November 12, 2014 @04:25PM (#8598298)
That's just BS and given the size of your axe to grind, you have to know it.

Akka? Spray? ScalaUtils? Do they take effort to learn? Yes. Are they anything like scala.collections? No.

Why didn't you pick scala.concurrent? Or scala.util? Or any number of other packages? Why didn't you use the signatures in the official docs as-presented?

The Scala team goes out of their way to present something simple and easily digestible to most programmers, even the ones unfamiliar with Type Classes.

I mean, you basically just use a Seq like an immutable version of Ruby's Array and it just does what you want 99.999% of the time.

How often do you see people go on to propose that because much of Ruby's Array implementation would be incomprehensible to 90% of Ruby programmers that that makes Ruby a bad language? It's an entirely ridiculous metric.

Re:Microsoft takes .NET open source and cross-platform by jakevn on Wednesday November 12, 2014 @01:05PM (#8597058)
[SerializableAttribute] [ComVisibleAttribute(false)] public class Dictionary<TKey, TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IDictionary, ICollection, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, ISerializable, IDeserializationCallback

Both languages can be difficult to decipher. I do find that Scala's syntax is much more flexible, which can lead to more stumbling when trying to read code.

Re:Microsoft takes .NET open source and cross-platform by katbyte on Wednesday November 12, 2014 @04:22PM (#8598284)
Its not as hard when you format it a little nicer (and when you have syntax colouring)

[SerializableAttribute] [ComVisibleAttribute(false)] public class Dictionary<TKey, TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IDictionary, ICollection, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, ISerializable, IDeserializationCallback { ... }

And this is of course ignoring the fact you copied that from the documentation witch shows all interfaces the class implements. IDictionary also implements ICollection & IEnumerable so you wouldn't need to include them. So to actually implement this class it would more likely be

[SerializableAttribute] [ComVisibleAttribute(false)] public class Dictionary<TKey, TValue> : IDictionary<TKey, TValue>, IDictionary, IReadOnlyDictionary<TKey, TValue>, ISerializable, IDeserializationCallback { ... }

maybe less

Re:Microsoft takes .NET open source and cross-platform by louthy on Wednesday November 12, 2014 @02:15PM (#8597519)
I'm a fan of C#, although I prefer F#; however I have to agree, I think the choice of < > for generic definitions was a real mistake, it can be so hard to parse. The side effect of this is that first-class functions (Func<>) are chronically underused by C# programmers.

Annoyingly F# brought them along for the ride too, although you rarely have to explicitly write them.

Re:Microsoft takes .NET open source and cross-platform by rjbwork on Thursday November 13, 2014 @01:35AM (#8600233)
What would you have used for generic arguments? I think they work fine, and make use of Func<T> often.
Re:Microsoft takes .NET open source and cross-platform by louthy on Thursday November 13, 2014 @09:50AM (#8601746)
I haven't tried out many alternatives, but there's something about nested <> that seems to throw me off each time.

I wrote a library of monads for C# [1], and implementing the SelectMany method is a good example of how messy it can be:

    public static RWS<R, W, S, V> SelectMany<R, W, S, T, U, V>( this RWS<R, W, S, T> self, Func<T, RWS<R, W, S, U>> bind, Func<T, U, V> project)
    {
    }
I quite like F#'s alternative syntax for single type generics:

    Option<int>
Can be written:

    int option
Obviously it's a personal thing, so I doubt I would be able to suggest anything that would change your mind; I just had a quick go at an alternative, and I quite like this:

    public static SelectMany R W S T U V ( this self : RWS R W S T, bind : Func T (RWS R W S U), project : Func T U V) : RWS R W S V
    {
    }

    class Thing int
    {
    }

    class Thing T : BaseThing T
    {
    }
It's moot anyway really, it is what it is. I've just found it cognitively challenging over the years.

[1] https://github.com/louthy/csharp-monad

Re:Microsoft takes .NET open source and cross-platform by hokkos on Wednesday November 12, 2014 @03:13PM (#8597841)
It is easier, there is only one concept to understand : generics, with scala you must understand generics, co and contra-variance, implicits.
Re:Microsoft takes .NET open source and cross-platform by jakevn on Wednesday November 12, 2014 @03:42PM (#8598013)
That's true.

A talented C# dev will need to know co/contravariance as well as implicits considering they also exist in C#.

In Scala, being familiar with these concepts is practically a necessity, though.

Re:Microsoft takes .NET open source and cross-platform by dragonwriter on Wednesday November 12, 2014 @06:04PM (#8598870)
> A talented C# dev will need to know co/contravariance as well as implicits considering they also exist in C#.

True for co/contravariance. For implicits, that depends on which implicits you are talking about.

Scala has:

* implicit conversion operators (these have existed in C# for some time, under the same name)

* implicit parameters (C# doesn't have an analog to these that I can think of)

* implicit classes (C# has an analog in classes providing extension methods, though the classes themselves are distinguished by a keywords as they are in Scala; in Scala, these are essentially syntactic sugar for creating a normal class and an implicit conversion from the extended class.)

Re:Microsoft takes .NET open source and cross-platform by jakevn on Wednesday November 12, 2014 @06:50PM (#8599090)
> implicit parameters (C# doesn't have an analog to these that I can think of)

C# allows default values for parameters, but it's not quite the same.

Example of C# default value for parameter:

  static void Addition(int a, int b = 42)  
  {  
    Console.WriteLine(a + b);  
  }

  Addition(4); // Prints 46  
  Addition(4, 5); // Prints 9
In Scala, the default (implicit) value has more complex rules.

Like C#, implicit parameters must come after non-implicit parameters (if any).

Unlike C#, the implicit value does not need to be defined in the signature. Also unlike C#, if you provide the value for one implicit parameter, you must provide the value for all implicit parameters.

Re:Microsoft takes .NET open source and cross-platform by dragonwriter on Wednesday November 12, 2014 @07:05PM (#8599152)
> C# allows default values for parameters, but it's not quite the same.

Right. Scala has C#-style default parameters as well, implicit parameters are a different (though very loosely related) thing.

Re:Microsoft takes .NET open source and cross-platform by hokkos on Wednesday November 12, 2014 @05:18PM (#8598642)
Can you give me examples of implicits in C# ? I am unable to see a parallel.
Re:Microsoft takes .NET open source and cross-platform by jakevn on Wednesday November 12, 2014 @05:53PM (#8598820)

  using System;
  
  public class Program
  {
  
  public class Person
  {
    private string _name;
    private int _age;
    
    public Person(string name, int age)
    {
      _name = name;
      _age = age;
    }
		
    public static implicit operator int(Person p)
    {
      return 42;
    }
  }
	
  public static void Main()
  {
    var person = new Person("Jim", 51);
    var number = 100;
    AdditionPrinter(person, number); // Prints 142
  }
	
  public static void AdditionPrinter(int a, int b)
  {
    Console.WriteLine(a + b);
  }
  
  }
Re:Microsoft takes .NET open source and cross-platform by seanmcdirmid on Wednesday November 12, 2014 @07:10PM (#8599171)
Also consider extension methods, which serve some of the same purpose as implicits in Scala.
Re:Microsoft takes .NET open source and cross-platform by ssmoot on Wednesday November 12, 2014 @04:06PM (#8598172)
Good point.

Though implicits I feel are so much simpler than many people fear.

From a Ruby perspective: Just think of them as operating similarly to Refinements, except not completely insane because there is no global scope at compilation. You only have to worry about your own package, imports and inheritance.

Tracking down an implicit generally takes all of 10 seconds, and never more than a few minutes. Even moderately brain-bendy ones like akka.patterns.ask (where does the implicit "?" come from? "ask" is actually an implicit conversion to a class that defines it: https://github.com/akka/akka/blob/master/akka-actor/src/main...).

Re:Microsoft takes .NET open source and cross-platform by EpicEng on Wednesday November 12, 2014 @02:58PM (#8597764)
Given proper indentation, ifall to see what is difficult to understand here. You have acouple of attributes, a generic you're declaration (with easy to understand syntax), and an inheritance list.
Re:Microsoft takes .NET open source and cross-platform by jakevn on Wednesday November 12, 2014 @03:43PM (#8598026)
That's how it goes.

A Scala dev will look at the Scala type signature and shrug.

A C# dev will look at the C# type signature and shrug.

As usual, unfamiliar things are difficult and familiar things are easy.

Re:Microsoft takes .NET open source and cross-platform by EpicEng on Friday November 14, 2014 @04:20PM (#8609568)
Yeah, and not knowing Scala myself, I can't say that the OP didn't purposely use a contrived example. That said, I still don't think a class definition which is little more than a bunch of interfaces being implemented is confusing to anyone who got through chapter 4 of "Learn C# in 21 days".
Re:Microsoft takes .NET open source and cross-platform by MrRadar on Wednesday November 12, 2014 @01:31PM (#8597256)
Thank you! I'm working on a team that inherited some Scala code from contractors that no longer work for us and we've found that (at least their) Scala is almost as hard to read as bad Perl. Compounding this is a severe lack of good online documentation outside of the standard library reference and simple tutorials which don't go into the depths we need to know (like how do you create a Manifest from Java to call into Scala code that needs it? Or what even is a Manifest?). At least with Perl you have decades worth of online discussions and pretty good documentation of the core language.
Re:Microsoft takes .NET open source and cross-platform by dragonwriter on Wednesday November 12, 2014 @05:51PM (#8598806)
> Thank you! I'm working on a team that inherited some Scala code from contractors that no longer work for us and we've found that (at least their) Scala is almost as hard to read as bad Perl.

I've seen C# that is almost as hard to read as bad Perl -- also, not surprisingly, from contractors who weren't going to be maintaining the code.

I don't think this says anything about C# or Scala, I think what it says is something about the natural result of the economic incentives of people being paid to throw code over the wall before they leave for greener pastures.

Re:Microsoft takes .NET open source and cross-platform by MrRadar on Wednesday November 12, 2014 @06:03PM (#8598865)
Yeah, I would agree with that. Scala is, at most, probably 2-3% responsible for the problems we're having with this project (due to inexperience with it). The vast majority of the blame rests on our contractors and on our management's lax oversight of them.
Re:Microsoft takes .NET open source and cross-platform by ssmoot on Wednesday November 12, 2014 @03:54PM (#8598076)
I think you just need to hire an experienced Scala Developer for a month or two until your team gets up to speed. It'd be like a c# team having a Ruby app dumped in their lap. You're practically preordained to hate it. ;-)

The documentation for Scala is actually pretty outstanding IMO. I had a much easier time compared to Ruby. Daniel Westheide's introduction series "The Neophyte's Guide to Scala" is the single best language intro I've ever seen, for any language. It even goes into enough of Akka to get a basic chat application going. And while Akka works nicely with Scala, it's conventions are so different it might as well be a different language. In idiomatic Scala you probably don't run into mapTo or vars too often for example, but that's going to be a pretty common sight working with Akka.

At least the documentation on PlayFramework.com is mostly current, and doesn't gloss over important detail. Unlike rubyonrails.org, where even five years ago the basics were horribly dated, inaccurate, and skip important background.

Re:Microsoft takes .NET open source and cross-platform by teacup50 on Wednesday November 12, 2014 @03:20PM (#8597873)
> we've found that (at least their) Scala is almost as hard to read as bad Perl. At least with Perl you have decades worth of online discussions and pretty good documentation of the core language.

Programming languages you don't know are harder to read than programming languages you do know.

Unlike "bad perl", you have types that tell you exactly what something does.

> ... and simple tutorials which don't go into the depths we need to know (like how do you create a Manifest from Java to call into Scala code that needs it?

Calling Scala from Java is not beginner level material that winds up in a tutorial, and it's a bad idea to begin with; you're stuck speaking a pidgin Scala using Java-only constructs just to maintain Java interop.

Re:Microsoft takes .NET open source and cross-platform by MrRadar on Wednesday November 12, 2014 @05:43PM (#8598760)
> Programming languages you don't know are harder to read than programming languages you do know.

I will definitely agree with you there. It would help our team significantly if we had a Scala expert we could consult but there's not enough in the budget (monetary or political) to hire one. We are pretty much left to fend for ourselves with Google, Stack Overflow and a couple reference books. This project also contains a C++ component that would probably have been just as impenetrable to my teammates (who have C but no C++ experience) if I hadn't already been fairly familiar with the language.

> Unlike "bad perl", you have types that tell you exactly what something does.

Static typing doesn't help always when you actively try to subvert it. There are casts to and from Any all over this codebase. Reflection is used everywhere even when it's not necessary. There are even places where they convert between types by serializing an instance of one type and deserializing it as an instance of another (with similar fields but not actually related in the type system). They also loved Option[] types which might not be so bad if they weren't also storing Some(null) into them in just enough places you forget to check for it but it still blows up in your face at least a once a month. Basically, the original authors of this code tried their best to destroy the usefulness of the Scala type system and succeeded fairly well.

> Calling Scala from Java is not beginner level material that winds up in a tutorial, and it's a bad idea to begin with; you're stuck speaking a pidgin Scala using Java-only constructs just to maintain Java interop.

By mandate of our management we are not allowed to write any new Scala code except where absolutely necessary. The contractors went behind our management's back to write it in the first place (we told them they could use Java 8 which they interpreted to mean they could use anything that would run on a Java 8 JVM). After that was found out (about a 1/3 of the way through the contract and too late to rewrite everything without blowing our contractual deadline with our customer) new Scala code was banned and they had to (and we have to) use Java as much as possible after that point. This is also not helped by the fact that at the time they handed the code over it was barely half-baked and performing at less than 25% of the needed throughput and we're left trying to finish and fix it.

Of course, when it can take three or four developers (with a combined background in Java, C#, C, C++, Python, Javascript, and an academic familiarity with OCaml-family functional languages) a half hour or more to figure out what a some of the methods in this codebase even do (at both a syntatic and conceptual level) I am going to put (a small) part of the blame on Scala for allowing such impenetrable code to be written in the first place. I'm certainly not placing all or even a significant amount of the blame for this project's problems on Scala but it is certainly not helping.

Thanks for letting me vent.

Re:Microsoft takes .NET open source and cross-platform by saosebastiao on Wednesday November 12, 2014 @01:03PM (#8597045)
You intentionally chose code that is hard to read...I could easily do the same with C#. It isn't representative of the vast majority of the code that I use nor write.

That being said, when you understand the nuances of type annotations, that code is quite readable in the mathematical notation sense. It is concise and takes more time per byte to understand, but it tells me enough about the code that I rarely have to read the actual implementation to know exactly what it does.

Re:Microsoft takes .NET open source and cross-platform by jbooth on Wednesday November 12, 2014 @01:13PM (#8597124)
It's from the standard collections library, the most-used code in any language.

It is in fact representative of the vast majority of code you use.

The fact that it wasn't immediately clear to you that a lot of your code DOES use this code is probably the strongest argument I could make.

Re:Microsoft takes .NET open source and cross-platform by com2kid on Wednesday November 12, 2014 @01:48PM (#8597371)
Now I love C#, but in defense of the above poster, standard library code is often pretty gnarly stuff.

C++ is the poster child for this. No one argues that C++ is a bad language just because the standard library is full of magic.

Re:Microsoft takes .NET open source and cross-platform by jbooth on Wednesday November 12, 2014 @02:11PM (#8597495)
Actually, I hold exactly that opinion about C++ :)
Re:Microsoft takes .NET open source and cross-platform by 72deluxe on Thursday November 13, 2014 @04:40AM (#8600681)
I find the STL great! Sure, some compiler template messages can be tricky to understand but STL doesn't detract from C++ - you don't have to use the STL (but you're probably losing out if you don't use it and roll all those containers and algorithms yourself)
Re:Microsoft takes .NET open source and cross-platform by com2kid on Thursday November 13, 2014 @01:19PM (#8603053)
Oh using the STL itself is fine, but some of the code behind it looks like a completely different language!
Re:Microsoft takes .NET open source and cross-platform by saosebastiao on Wednesday November 12, 2014 @01:44PM (#8597331)
You have inferred more about me than you are entitled, and even if you were right, your argument is still poor. Have you read the c# stdlib? It is in no way any better. Stdlibs are always more complex than the code that builds on them, and that is by design. The same code that I use for a oneliner has to be robust enough to apply to play, akka, spark, finagle, etc. That is the primary reason why StdLib documentation is made more accessible. I have never had to read the Scala StdLib source code, and likely a tiny minority of Scala devs have done so.
Re:Microsoft takes .NET open source and cross-platform by Alphasite_ on Wednesday November 12, 2014 @04:49PM (#8598442)
The internals of STDlibs tend to be nasty, but externally they're designed to be clear. The problem here is externally these interfaces are extremely messy and hard to follow, i.e. the abstraction doesn't seem to work.
Re:Microsoft takes .NET open source and cross-platform by hrjet on Wednesday November 12, 2014 @10:57PM (#8599827)
That is a good distinction to make. But then, you need to consider other factors as well. How powerful is the API, how honest is the API (doesn't hide internal gimmicks), how consistent is the API across the lib, and how DRY it is (to the STDlib implementors).

Scala's STDlib might be more powerful, more honest and more consistent, and also might be striving to be DRY for the implementors.

Personally, I feel that Scala's Collections goes overboard in hitting the above goals, and the resulting signatures are too verbose. And this increases the cognitive load for the subset of people that need to bother about it (performance tuners, architects, etc). But that's not a fault of the language per se.

Re:Microsoft takes .NET open source and cross-platform by jbooth on Wednesday November 12, 2014 @02:14PM (#8597516)
I inferred that you probably use standard library collections. Not really an insulting inference, it'd be insulting to assume you didn't.

Personally, I make it a habit to always read (or try to read, in this case) standard library source code that I'm depending on to be correct.

Re:Microsoft takes .NET open source and cross-platform by ezy on Thursday November 13, 2014 @02:29AM (#8600358)
Have you read the implementation of the python collection types (list, map, etc.)?
Re:Microsoft takes .NET open source and cross-platform by hokkos on Wednesday November 12, 2014 @03:13PM (#8597846)
It is not representative probably because the IDE hide the ugliness.
Re:Microsoft takes .NET open source and cross-platform by ssmoot on Wednesday November 12, 2014 @04:14PM (#8598216)
The official docs do to.

To get the "ugly" signature you have to look at the actual source, or example the method definition in the official docs.

They go out of their way to make sure to present an easy-to-understand version for actual users.

Which is why every actual Scala developer rolls their eyes at someone bringing up CBF. You have to go out of your way to try to be confused about it. And if that digging stops at finding the method signature, well, probably serves you right for being confused. ;-)

Is CBF amazing? Probably not. Is it some sort of confusing eternal battle for most Scala developers? Absolutely not.

I mean just look at the official docs, find out where he got these weird examples from, and then tell me this is a well reasoned argument.

Re:Microsoft takes .NET open source and cross-platform by vithlani on Wednesday November 12, 2014 @08:56PM (#8599533)
LOL! amen brother, tell it like it is.... people seem to have NO appreciation for the idea of simplicity.
Re:Microsoft takes .NET open source and cross-platform by Vektorweg on Wednesday November 12, 2014 @12:41PM (#8596880)
Actually, the vast amount of features in C# isn't improving readability. But MS can't just throw out the bad half of features, which makes C# practically unimprovable. Scala has a similar problem.
Re:Microsoft takes .NET open source and cross-platform by alkonaut on Wednesday November 12, 2014 @04:14PM (#8598220)
Why not? I just can't see why every language needs to gather cruft rather than evolve elegantly. Imho major versions of compilers should aim to NOT remain backwards compatible, so they can remove or change things in the syntax while they add things.
Re:Microsoft takes .NET open source and cross-platform by marvy on Wednesday November 12, 2014 @10:40PM (#8599783)
Imagine this. I'm using Cool-Lang version 2. Now Cool-Lang 3 comes out. It has lots of features that I want to use. If the new version is compatible with the old one, I download it and start using it. If not, I have to convert my whole codebase first. In practice, that means it may be many years before I can use version 3. Look at Python. In 3.0, they decided to clean up some stuff from 2.x. They even wrote a tool 2to3 which will automatically fix most of the incompatible stuff for you, so converting the whole codebase is almost automatic. The problem is "almost" automatic is not enough. Many people and groups have yet to convert their old code.
Re:Microsoft takes .NET open source and cross-platform by alkonaut on Thursday November 13, 2014 @01:21AM (#8600204)
Py2 to py3 is too far a jump which is made obvious from the fork-like nature of the project. Minor changes like API deprecation is of course already taking place in most projects. Just need to strike a balance.

I rewrote 100klines at least from C#1 to C#2 when generics came in 2.0. It was compatible in that the non generic code still worked, but I don't really see what difference that made. If we didn't want to upgrade the cod me then we wouldn't have updated the compiler!

Obviously if you don't want the benefits of Py3 then you don't have to pay the upgrade cost either.

Re:Microsoft takes .NET open source and cross-platform by frowaway001 on Wednesday November 12, 2014 @05:37PM (#8598737)
> But MS can't just throw out the bad half of features, which makes C# practically unimprovable. Scala has a similar problem.

How? Scala has been throwing out bad features in pretty much every single release for the last 5 years.

It's nothing breathtaking, it just gets done, people are happier and the language gets better.

Re:Microsoft takes .NET open source and cross-platform by pjmlp on Thursday November 13, 2014 @04:08AM (#8600597)
Scala has hardly the user base of C# developers.
Re:Microsoft takes .NET open source and cross-platform by frowaway001 on Thursday November 13, 2014 @09:30AM (#8601647)
So how has Scala "a similar problem"?

Plus, for this question, the size of the user base doesn't matter: If a developer has to adapt his code to a new language version, he/she doesn't care whether ten or ten-thousand other people have to do the same.

Re:Microsoft takes .NET open source and cross-platform by pjmlp on Thursday November 13, 2014 @10:02AM (#8601809)
It matters for the language designers, how much people they want to make angry for breaking their code.

Scala's smaller user base means there are a lot of less people to get mad.

Re:Microsoft takes .NET open source and cross-platform by frowaway001 on Thursday November 13, 2014 @10:31AM (#8601979)
And you still haven't explained how Scala has a similar problem.
Re:Microsoft takes .NET open source and cross-platform by pjmlp on Thursday November 13, 2014 @11:54AM (#8602518)
I am not the OP. Just commenting on this

> Scala has been throwing out bad features in pretty much every single release for the last 5 years.

You cannot throw out features in a language with the community size C# has, otherwise you just get another Python 3.0.

Re:Microsoft takes .NET open source and cross-platform by frowaway001 on Thursday November 13, 2014 @01:37PM (#8603179)
I'm not sure comparing C# to Python makes sense.

  a) Microsoft is in an excellent position to make such 
     changes, unlike Python, because Microsoft shops will 
     largely do whatever Microsoft tells them.

     Just have a look at how often they have incompatibly 
     changed the standard library used by C#.

  b) Not every language has to botch the transition as badly
     as Python designers did.
Re:Microsoft takes .NET open source and cross-platform by Vektorweg on Friday November 14, 2014 @12:46AM (#8605960)
Scala keeps features for imperative and functional programming, which is one category too many, because they solve the same problem just different. Thats how Scala is supposed to work. Its impossible to remove an approach.
Re:Microsoft takes .NET open source and cross-platform by frowaway001 on Friday November 14, 2014 @07:51AM (#8606870)
That's not even remotely related to the topic, isn't it?
Re:Microsoft takes .NET open source and cross-platform by Vektorweg on Friday November 14, 2014 @09:08AM (#8607140)
Theoretically, everything is related to each other. Practically, no.