Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C# allows var.
Many Stack Overflow answers contain "var".
I hate var in languages that allow specifying types. -
gblues6187yJava has var in Java 9 too. It’s still strongly typed, it just automatically figures it out based on the return type of the RHS of the assignment.
-
even in C++ there is auto now, which acts like var and is even recommended by Scott Meyers to use whenever possible because generally it is faster and safer than explicit type declarations๐
but you should still know your types ๐ -
Last time I checked php is also object-oriented in terms of programming paradigms
-
RageBone5907y@Lahsen2016 Well, fuccboi ist aber harsh I think.
@diomonogatari it is, had a short talk about that too, turns out, he actually uses polymorphism.
He just didn't know what it is. He liked it ๐
And thanks to everyone! My first rant with i > 25 -
@filthyranter Var is to remove clutter
var myvar = new SomeClass(); tells you everything you need to know. If you use a decent IDE it tells you the type anyway. I always use var when its type is obvious. It is also best practice according to Microsoft's C# coding conventions. -
@gnaaah Only in the cases @MrThompson mentioned. If there's a type you don't exactly know well then have fun finding it out
Related Rants
Talked to long time friend a while back.
I think he freelances now and does some kind of web design stuff.
He said, he hates java, and I asked what he hates about it:
" Those stupid variable types, I only use VAR in PHP to get around that stupid stuff. And what is this Oop anyway?".
๐ต Dude? The fuck?
rant
php
the fuck dude
oop
java
everything is type var