Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

to me SELECT * is like var in C#


I don't understand the var hatred in c#. Why type a type name twice? I can understand a function result needing to be explicitly typed but why do this?

StringBuilder stringBuilder = new StringBuilder();

That is horrendously redundant. Var is handy shorthand and should be used!!


To provide an alternative view, in e.g. Haskell the redundancy would be solved the other way round:

    (stringBuilder :: StringBuilder) <- construct
(Assuming that there was a type class that had construct as a method and StringBuilder was an instance of that class.)


when declare and init an obj with constructor, yes it's annoying to type the type twice and I def. use `var`

But what if you're doing something like

    var x = myOtherObjectName.y;
readability is destroyed in this case.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: