Comments on: C# vNext feature request http://jrwren.wrenfam.com/blog/2008/05/15/c-vnext-feature-request/ babblings of a computer loving fool Mon, 21 Nov 2016 19:37:12 +0000 hourly 1 https://wordpress.org/?v=4.7.2 By: Robert http://jrwren.wrenfam.com/blog/2008/05/15/c-vnext-feature-request/comment-page-1/#comment-30757 Sun, 20 Jul 2008 12:13:29 +0000 http://jrwren.wrenfam.com/blog/2008/05/15/c-vnext-feature-request/#comment-30757 I pretty much agree on everything aside 2 things.

The whitespace i hate in languages like VB, because when you have very long code, it’s just plain hard to see where something ends, with brackets it’s completely non-trivial, cause they sorta jump into your face to say: hey look, i start here & end here ..i love brackets 🙂

And in the example where you say: {1..10} |> Seq.fold (+) 0;;
is more readable, sorry, but i find: Enumerable.Range(1, 10).Sum();
to be the most readable (and understandable) of what is going on. The F# example just looks like a bunch of mathematical gibberish to me.

Dropping the var doesn’t shock me at all tho i can understand some ppl might wanna keep it as a visual queue (like me for brackets).

Then for static imports ..i guess it won”t change much from extension methods, just do a (go to definition).


Robert

]]>
By: jrwren http://jrwren.wrenfam.com/blog/2008/05/15/c-vnext-feature-request/comment-page-1/#comment-30748 Mon, 14 Jul 2008 23:09:01 +0000 http://jrwren.wrenfam.com/blog/2008/05/15/c-vnext-feature-request/#comment-30748 Hello Anonymous,

I usually wouldn’t reply to an Anonymous person, but your response is well written.

I too have to often read the code of others. This is life. The complexity or verbosity of a language doesn’t make this more difficult or more easy. I’ve decyphered perl code that was more complex than 8086 assembly and I’ve read perl code that was easier to read than Java in articles on java world. The language and its features do not matter her.

Static imports might be a little confusing, but Java has them and they don’t confuse the java folks. Your argument against would be the exact same argument against extension methods, but we have extension methods. Refactoring tools and good IDE tools make this a trivial no brainer. F12 go-to-definition will still work in Visual Stuido.

Your argument here against var shows that you don’t understand what var in C# is. It is not dynamic. C# 3 has no dynamic variables or dynamic typing. it is not quasi-dynamic. it is absolutely no different than explicitly putting a type before the variable declaration except that the compiler fills in the type from the assignment portion of the statement.

Type Inference we agree on. Good!

Whitespace: you have obviously never read or written either Boo. Python or Yaml. These whitespace significant languages have never suffered from what you describe.

Sorry, but on the three points you differ with me on, you arguments don’t hold up. I am open to changing my mind on these requests, but I would need to be swayed and these points aren’t swaying me.

]]>
By: Anonymous http://jrwren.wrenfam.com/blog/2008/05/15/c-vnext-feature-request/comment-page-1/#comment-30742 Sun, 13 Jul 2008 17:19:56 +0000 http://jrwren.wrenfam.com/blog/2008/05/15/c-vnext-feature-request/#comment-30742 I must say, I disagree passionately about most of your suggestions/requests.

Let me first preface the following comments with an important bit of information. I am in the consulting business and, as such, I often have to read code written by other developers and fix it or modify it. As I am sure you are aware, every developer has his/her own unique style. This is both a good and bad thing. The good should be pretty obvious. The bad, however, is that because everybody has their own style, it makes reading somebody else’s code difficult. Most of the suggestions you have proposed only make that job (deciphering someone else’s code) all the more difficult.

Static Imports – Confusing. If I am reading code in ClassA and I see a method call DoSomething, I expect that DoSomething to be a method of ClassA. Static imports mean I can no longer make this assumption and, instead, have to remember more of the entire design of your code.

Drop var – NO, just NO. This is just a terrible idea. C# is not a dynamic language. I do not want to have every typo I make end up being a new dynamic variable. I already struggle with this enough in JavaScript.

Better type inference – Unless I misunderstand, I think I agree with this one (at least, based on the example you gave)

Optional Whitespace Significance – OMG! No no no. Please no. If you don’t like C#’s syntax, use a different language. It’s bad enough that people can’t agree on whether to put braces on the same line as constructs, tabs vs spaces, commenting styles, etc. Bad programmers are far more common than good ones, and giving the bad programmers more options for creating write-only code only makes my life more miserable.

]]>
By: Jay R. Wren - lazy dawg evarlast » Blog Archive » C# vNext feature request 2 http://jrwren.wrenfam.com/blog/2008/05/15/c-vnext-feature-request/comment-page-1/#comment-30740 Sun, 13 Jul 2008 15:28:42 +0000 http://jrwren.wrenfam.com/blog/2008/05/15/c-vnext-feature-request/#comment-30740 […] previously had a list of things I wanted. Yes, I am like a 2-year old. I want. I want. I […]

]]>
By: Jay R. Wren - lazy dawg evarlast » Blog Archive » C# is already whitespace significant http://jrwren.wrenfam.com/blog/2008/05/15/c-vnext-feature-request/comment-page-1/#comment-30658 Tue, 10 Jun 2008 19:36:16 +0000 http://jrwren.wrenfam.com/blog/2008/05/15/c-vnext-feature-request/#comment-30658 […] the warning generating code. But in this case the C# language is white space significant. Why not extend this to other areas of the language? « Using xmllint because xml still […]

]]>