News for hackers. Stuff that matters.
Re:The future of C# and Visual Basic [video] by pjungwir on Monday November 03, 2014 @12:03PM (#8551894)
> C# is the best language I've ever worked in. But the .NET platform is one of the worst

That sums it up for me, too. I'm mostly a Ruby developer, and in C# I get tons of Ruby-like features, plus static typing and better performance. But my years with Java spoiled me for a clean and consistent stdlib. For instance in C# collections are just a mess. If I could build Rails apps in C# and deploy on Linux, I'd probably do it.

Re:The future of C# and Visual Basic [video] by garrettheaver on Monday November 03, 2014 @12:07PM (#8551924)
As a developer with experience in .NET, Java and Ruby, I'm curious as to what makes you say C# collections are a mess? At least relative to Java?
Re:The future of C# and Visual Basic [video] by pjungwir on Monday November 03, 2014 @01:22PM (#8552450)
I haven't used either in a few years, but Java's are trivial to remember:

* List: implemented by ArrayList and LinkedLink

* Set: implemented by HashSet

* Map: implemented by HashMap

All are Collections.

Then it's easy to get immutable versions, synchronized versions, Sorted{Set,Map}s (implemented by Tree{Set,Map}).

They work with Comparator and Iterator in a consistent way.

There is symmetry and unity. I don't even remember the C# analogues, but my recollection is that sometimes they come with an interface, sometimes not, the names are messier, generics are less consistent, and there isn't a unified way to get immutable versions etc.

I don't think C#'s collections were that bad, and probably people here can correct my memory about some of the above, but they weren't as clean, and to me that was a motif throughout the framework. A messy collections API is no big deal really, but when it's the same story for I/O, networking, GUI, etc. . . . (I do think layout was a lot easier in WinForms than Swing though.)

On balance I'd take C#'s rapid evolution over Java's slowness, but what Java got from its conservatism was purity and low cognitive overhead, which as a working programmer was pretty nice.

That said, it'd still be really cool if I could write Rails apps in C# on Linux. With vim. :-)

Re:The future of C# and Visual Basic [video] by usea on Monday November 03, 2014 @02:05PM (#8552716)
In C#:

IList<T>: implemented by List<T> and T[] (arrays)

ISet<T>: implemented by HashSet<T> and SortedSet<T>

IDictionary<T,U>: implemented by Dictionary<T,U>

all implement ICollection<T> and IEnumerable<T>. In the case of dictionary, it implements ICollection<KeyValuePair<T,U>>, IEnumerable<T> (.Keys) and IEnumerable<U> (.Values), etc

It's all basically the same thing. Organized and unified.

IList<T> is actually implemented by a lot of things, and the more general you go, the more things implement it. IEnumerable just allows you to get an iterator that will go through the elements. ICollection adds the ability to add and remove elements. IList further adds indexed access and order. The generic collections and operations on them are one of the best aspects of C# and the standard lib.

Re:The future of C# and Visual Basic [video] by pjungwir on Monday November 03, 2014 @02:22PM (#8552841)
Thank you for your correction! I am still suspicious that there is some forgotten weirdness lurking in there, but I'm glad someone didn't let me propagate my mistaken recollections unanswered. :-)
Re:The future of C# and Visual Basic [video] by twic on Monday November 03, 2014 @02:06PM (#8552726)
> All are Collections.

Except Map. See the section in the Java Collections API Design FAQ [1] on "Why doesn't Map extend Collection?".

[1] http://docs.oracle.com/javase/8/docs/technotes/guides/collec...

Re:The future of C# and Visual Basic [video] by pjungwir on Monday November 03, 2014 @02:11PM (#8552762)
Ha ha, I knew I shouldn't have answered that question. :-)
Re:The future of C# and Visual Basic [video] by miguelrochefort on Monday November 03, 2014 @02:41PM (#8552959)
ASP.NET MVC is very similar to Rails.
Re:The future of C# and Visual Basic [video] by rjbwork on Monday November 03, 2014 @06:34PM (#8554268)
They basically took rails, removed active record, dropped in EF, gave it a better templating language, gave it static typing via C#, and threw it into the mix w/ webforms and called it a day. They've been improving it constantly since as well.
Re:The future of C# and Visual Basic [video] by miguelrochefort on Tuesday November 04, 2014 @09:23AM (#8556590)
Shhh. People don't know that.