News for hackers. Stuff that matters.
Re:Why I'm no longer giving up on C# by sergiotapia on Monday July 22, 2013 @03:46PM (#6086056)
Still C# comes with it verbose baggage and it shows, even with your simple example of:

    Get["/"] = _ => "Hello World!";
Or even the class declaration:

    public class SampleModule : Nancy.NancyModule
My RSI is starting to flare again...
Re:Why I'm no longer giving up on C# by gecko on Monday July 22, 2013 @04:10PM (#6086172)
Seriously? Your two examples make the counterpoint to your argument.

The first example in Python would be some variant of

   @get('/')
   def whatever():
       return "Hello World!"
Or in Ruby:

    get "/" do
        "Hello World!"
    end
Or in Go:

    http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
        fmt.Fprint(w, "Hello World!")
    })
These other languages, all popular on HN, are nearly identical to the C#, or even longer in a couple of cases. You'd have to go with a project-specific macro package on a Lisp to get much terser.

The second C# is also quite terse, IMHO. What would you have preferred? The equivalent Python would be something like

    __all__ = ['SampleModule']
    class SampleModule(nancy.NancyModule):
        pass
which, even if you want to say well, no one in real life uses __all__ (which isn't correct) is still nearly the same length. I don't quite remember the Ruby off the top of my head, but it, too, is similar, as would be Perl.

Older C# versions could be verbose, but this seems quite terse to me.

Re:Why I'm no longer giving up on C# by spamizbad on Monday July 22, 2013 @03:54PM (#6086088)
It's not so bad when you lean on Visual Studio to do your typing.

I imagine there's some sort of causal relationship between ultra-powerful IDEs and languages that are verbose. The question is: are the IDEs powerful because the languages require them to be OR did the language evolve to become more verbose due to the IDE eliminating most of the pain associated with verbosity? Both? Neither?

Re:Why I'm no longer giving up on C# by AndrewDucker on Monday July 22, 2013 @04:05PM (#6086142)
A mixture. The verbosity is basically enforced documentation - you're describing more about your code, and how you expect it to work, but that gives the IDE information to help you with that description.
Re:Why I'm no longer giving up on C# by nahname on Monday July 22, 2013 @04:05PM (#6086146)
I typed way more doing ruby on sublime than I ever did C# with resharper. I'm writing less than half the code now, but still typing way more.
Re:Why I'm no longer giving up on C# by sergiotapia on Monday July 22, 2013 @04:07PM (#6086159)
You are comparing a text editor with a full-fledged IDE.

I type even less on RubyMine. Try it out, it's free for the first 30 days and then it is fairly priced.

Re:Why I'm no longer giving up on C# by coldtea on Monday July 22, 2013 @05:26PM (#6086567)
>*My RSI is starting to flare again...

I call BS. The same things are just as lengthy in most languages you'd use.

And there's nothing there that does not need to be. You still get the "class" signifier in Python or Ruby, and even more BS on Javascript (the huge word: "prototype").

The only thing that COULD be missing is the "public" modifier, if things were public by default.

Re:Why I'm no longer giving up on C# by EpicEng on Monday July 22, 2013 @04:24PM (#6086230)
1. There's nothing verbose about those two snippets. 2. Comparing a dynamically typed language to a statically thped language and complaining about type/access modifiers is silly.
Re:Why I'm no longer giving up on C# by cmircea on Monday July 22, 2013 @04:42PM (#6086335)
Besides the C# compiler being able to infer types in almost every situation.
Re:Why I'm no longer giving up on C# by apalmer on Monday July 22, 2013 @04:02PM (#6086130)
ehh the language is what it is, its a good language within its constraints but if your philosophically opposed to its core tenets you arent going to like it