Live data from Hacker News

Why C# is the best language for mobile development

blog.xamarin.com

101–110 of 125 posts

Re: Why C# is the best language for mobile development

#101
post #97

Earlier quoted context omitted.

If you're doing that it's crap code; you should have defined a few named object types. Maybe your "Dictionary " is e.g. actually a "PropertyMap". this is not a problem in the c# language. See also: "primitive obsession" http://c2.com/cgi/wiki?PrimitiveObsession http://sourcemaking.com/refactoring/primitive-obsession

Not at all - you just missed a few facts that need considering. Lets rip it to bits some more: It's in system.windows.forms isn't it? Don't really want that dependency and associated resolution being dragged in to a web app otherwise the compiler has to load the entire assembly's metadata. Also, it requires full trust. Oh and finally it isn't serializable. Which is why we end up with SerializableDictionary which is e…

The typical experience isn't that bad, let alone "The whole thing is"

Re: Why C# is the best language for mobile development

#102
post #53

> Their data shows that C# popularity grew by 2.3 percent in 2012, more than any other programming language during the same period. As many pointed out when that story came out, that datapoint is highly suspicious. There are plenty of smaller languages that have surely grown much more than that (it's easier to grow more when you are small). Also, the actual popularity is what really matters, not the increase. If C# i…

C# is a dominant language for indie games: Unity, and almost all games using the Unity engine; Magicka, Terraria, Breath of Death, Weapon of Choice, and Sol Survivor, which use the XNA framework; Eufloria, which was originally written in C# prior to the cross-platform release, AI War, which uses C# and Mono, and Bastion, which uses MonoGame.

Re: Why C# is the best language for mobile development

#103

Sigh . Okay, let's play this game. 1. "Cutting edge", first thing listed is asynchronous programming. Okay, don't get me wrong, I like C#, I like the Task Parallel Library, but Grand Central Dispatch in OS X/iOS is beautifully simple and incredibly powerful. It does everything I need it to do. 2. "Powerful features" - OOP. Really? And Java/Objective-C don't support OOP/encapsulation? You can't do dependency injection…

3. So you like ARC? Do you prefer it over endless retain/release calls? a. because it reduces the chances of memory leaks in your code? Because in this case you negate your "every programmer worth his salt" point in #5 which we've all seen thousands of times when people explain why c++ is really the best language to be writing all software. b. because it greatly reduces the repeated boilerplate code? Which is pretty…

> because it greatly reduces the repeated boilerplate code? Which is pretty much how I define objective c in a single word: tedium. It's been a few years but all I remember from my brief foray is comparing every tutorial to how much shorter everything would be if it were written in another language. Pretty much any language other than c++ not just c#.

Do you mean "shorter" in the sense of fewer characters, or "shorter" in the sense of fewer tokens? I've found both to be true to some degree (the state of text processing in Cocoa is positively barbaric), but what people usually complain about is the former, and I can't agree that it's a problem.

I can understand why too much typing gets tedious, but I think as a criticism it's a red herring, because it's essentially the complaint that Objective-C tends to be descriptive. That's normally considered a good thing! With autocomplete, typing Objective-C isn't harder than typing code in any other language, and the descriptive names help when reading unfamiliar code. I can come across a method call in somebody else's Objective-C codebase and instantly understand what each argument is and does without having to jump around and look at definitions.

If you actually mean you have to do more, though, I think that's one of those things that varies a lot from program to program. It's not really inherent to the language.

Re: Why C# is the best language for mobile development

#104
post #53

> Their data shows that C# popularity grew by 2.3 percent in 2012, more than any other programming language during the same period. As many pointed out when that story came out, that datapoint is highly suspicious. There are plenty of smaller languages that have surely grown much more than that (it's easier to grow more when you are small). Also, the actual popularity is what really matters, not the increase. If C# i…

C# is a dominant language for indie games: Unity, and almost all games using the Unity engine; Magicka, Terraria, Breath of Death, Weapon of Choice, and Sol Survivor, which use the XNA framework; Eufloria, which was originally written in C# prior to the cross-platform release, AI War, which uses C# and Mono, and Bastion, which uses MonoGame.

Yeah, exactly, indie games would have been a much better example than Windows 8 in that article.

Re: Why C# is the best language for mobile development

#105
post #95

Earlier quoted context omitted.

"but you're still not applying this mixin to a poco" Clarify?

POCO = Plain Old (CLR) Object The distinction I'm drawing here is what is meant by 'natively supports' and 'supported via a 3rd party library'

That's what I need clarification on. the dynamic keyword wasn't provided by any 3rd party library (it's part of the C# language specification)... how is System.DynamicObject and IDynamicMetaObjectProvider different then System.Object? All poco's inherit System.Object. Do you consider System.Object as 3rd party? True, by default poco's don't inherit from System.DynamiObject. Does that make it not 'natively supported'?

Re: Why C# is the best language for mobile development

#106
post #21

Earlier quoted context omitted.

This is a fundamental place where the worlds of C# and Java differ. Where the Java world would say, "developers might misuse this, better not have it in the language," the C# world says, "developers could really use this, better put it in the language."

And if you've worked on a large project with a lot of cats to herd for both platforms, you will appreciate java very quickly.

But it doesn't appear (anecdotally I admit) that people feel that way. Seems the "whole world" (speaking loosely) is turning against Java because of this very philosophy.

Because Java has been so conservative, people actively hate it's verbosity, boilerplate-ness, and lack of language features (anonymous functions, first class functions, etc.).

So Java has, for many years, helped huge teams of mediocre developers avoid certain kinds of self-inflicted wounds by being conservative in terms of language features. And the result seems to be that Java is increasingly scorned.

I know if I had to replace my C# work with Java, I'd feel incredibly frustrated at the lack of language power. In fact, I wouldn't choose to do it -- it would have to be a hell of a project or opportunity to pull me into it.

(Luckily for me, there are many better options, like Clojure or Scala on the JVM, or Haskell, Python, Ruby, etc. off the JVM).

Re: Why C# is the best language for mobile development

#109
post #81

Earlier quoted context omitted.

C#'s (and Java's) lack of multiple inheritance is a virtue, IMO.

I generally agree that use of mixins / multiple inheritance leads to architectural missteps.

...aren't they completely different tools? One uses mixins to keep the class hierarchy shallow, with fewer levels of inheritance. OTOH multiple inheritance tends to complicate an overly convoluted class hierarchy most of the time. It's true that in a language like Python people use multiple inheritance to "simulate mixins", but it's to the same good effect of keeping the class hierarchy short and flat, but in C++ at least I've never seen MI used to simplify things, as opposed to mixins that always seem well used...

Re: Why C# is the best language for mobile development

#110

Earlier quoted context omitted.

I don't understand. Are you saying that map, filter, reduce and al. on lazy sequences in functional languages are inferior to loops, or that Python list comprehensions and generators are inferior to loops? That's basically LINQ to objects. Maybe you're refering to LINQ-to-whatever (LINQ to SQL, etc.), a LINQ generalization where you can quote your expressions, rewrite the AST and emit something else (a very constrain…

In the vast majority of cases it is nothing more than syntactical sugar around loops. And no, I'm not saying that loops are superior, but rather I'm saying that loops are usually a terrible solution, but LINQ has a way of essentially hiding those egregious violators. Take a block of code with LINQ in it and rewrite it minus LINQ but logically performing the same operations that the sugar is resolving to. To most deve…

> I'm saying that loops are usually a terrible solution, but LINQ has a way of essentially hiding those egregious violators

So when you want to sort, search or transform a list, you prefer a technique which doesn't iterate over the items in the list at all? That makes no sense.

Post reply on HN