4 ms·
Still C# comes with it verbose baggage and it shows, even with your simple example of: Get["/"] = _ => "Hello World!"; Or even the class declaration:
by sergiotapia 13y ago
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...
- spamizbad 13y agoIt'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?
- AndrewDucker 13y agoA 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.
- apalmer 13y agoehh 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
- nahname 13y agoI 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.
- sergiotapia 13y agoYou 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.
- gecko 13y agoSeriously? 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.
- EpicEng 13y ago1. 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.
- cmircea 13y agoBesides the C# compiler being able to infer types in almost every situation.
- coldtea 13y ago>*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.