4 ms·
to me SELECT * is like var in C#
by tuananh 13y ago
to me SELECT * is like var in C#
- S_A_P 13y agoI 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!!
- tuananh 13y agowhen 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.
- eru 13y agoTo 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.)