WTF ... IS WTF!?
We are a collective of people who believe in freedom of speech, the rights of individuals, and free pancakes! We share our lives, struggles, frustrations, successes, joys, and prescribe to our own special brand of humor and insanity. If you are looking for a great place to hang out, make new friends, find new nemeses, and just be yourself, WTF.com is your new home.

C# 3.0 Spec Released

jamesp

In Memory...
1,714
1
0
#2
Dude, the PHP way of creating variables is childlike, and not at all like it is in a real programming environment. The C# way is way better if you ask me.

After reading all 26 pages of the documentation, I must say....not too much has changed. Except maybe now you will have to use pointers even less.
 

Jung

???
Premium
13,970
1,391
487
#3
jamesp said:
Dude, the PHP way of creating variables is childlike, and not at all like it is in a real programming environment. The C# way is way better if you ask me.
I've always thought other languages were too wordy in that regard, even before I knew php. An interpreted language, especially one that uses a JIT(and if you read, those "Implicitly typed " vars still get JIT'd), has no need for var type declarations; i = 5 should automatically be recognized as an int, i = "foobar" a string, and so on. $i = 5 and $i = foobar are just as readable. Just like in Python, where i = 5 is an int and i = foobar is a string.

Seriously, if there are any benefits of declaring every single variable as int = 5 and string = “foobar” then please enlighten me.

Don’t get me wrong though, I’m not trying to compare languages here, it’s just one of the things I like about php.(which I only used as an example)
 

jamesp

In Memory...
1,714
1
0
#4
I know from personal experience that when working with datatypes, like int, float, or double, there are instances where you have to declare exactly what it is. Or look at function overloading. Without explicitly declared variables, that would get quite muddy.

And by the way, I like that about php too, but in higher level languages like C#, you need to be explicit.
 

Jung

???
Premium
13,970
1,391
487
#5
jamesp said:
Without explicitly declared variables, that would get quite muddy... but in higher level languages like C#, you need to be explicit.
I guess it's just a difference of opinion. I've never saw a need for it, save for in a low-level languages like C. I've written some pretty large apps in both C and Python, and while I see it's need in C, I don't think languages like C#, Java or Python need it.

Anyway, it's a minor aggravation and intellisense takes care of it for the most part. :happysad: