Not sure how heated this topic is, but hey, some people feel strongly about their typing.
So, what typing discipline(s) do you prefer?
Here is a short explanation of each:
Static: The type of a variable can NEVER change (an integer will always be an integer)
Dynamic: The type of a variable can change (an integer variable can become a float variable)
Explicit: The type of a variable is explicitly specified (int x;)
Implicit/Duck: The type of a variable is implied by the value it holds (x = 1 x is an integer)
Strong: Types must be converted before they can be called a new type
Weak: All types are interchangeable and do not need to be converted (think BASH variables)
I prefer strong dynamic duck typing. To me, it allows for the most flexibility when dealing with variables. I also think that weak typing is really poor, and that is why BASH sucks so much.
Preferred Typing disciplineStatic, Dynamic, Explicit, Implicit/Duck, Strong, Weak
31 Replies - 5269 Views - Last Post: 04 March 2010 - 09:18 PM
Replies To: Preferred Typing discipline
#2
Re: Preferred Typing discipline
Posted 01 March 2010 - 01:44 PM
Strong dynamic duck typing. Just like you.
This post has been edited by Raynes: 01 March 2010 - 04:24 PM
#3
Re: Preferred Typing discipline
Posted 01 March 2010 - 09:01 PM
Who cares, to me they're all values from 0x0 to 0xFF..FF where the number of Fs is equal to the number of bits representing the number in the CPU divided by 4 in the end. All programming languages do is add these silly limitations for your own sanity so writing a program doesn't take twelve ages and a half 
... I voted for strong duck dynamic.
... I voted for strong duck dynamic.
This post has been edited by WolfCoder: 01 March 2010 - 09:03 PM
#4
Re: Preferred Typing discipline
Posted 01 March 2010 - 09:37 PM
For play/convenience, strong dynamic duck.
For work and mission critical crap, strong static explicit.
For work and mission critical crap, strong static explicit.
#5
Re: Preferred Typing discipline
Posted 01 March 2010 - 09:49 PM
So I think we all agree that weak typing is bad.
#6
Re: Preferred Typing discipline
Posted 02 March 2010 - 02:12 AM
There is nothing wrong with weakly typed languages. C and C++ are weakly typed languages and they still manage to do just fine, even in mission critical applications. I think the sane choice is a strongly typed language, but it's not always required.
#7
Re: Preferred Typing discipline
Posted 02 March 2010 - 05:19 AM
Now now, nobody act like I said I though weakly typed languages should be punched in the face. I was just stating my preferred typing!
#8
Re: Preferred Typing discipline
Posted 02 March 2010 - 07:16 AM
#9
Re: Preferred Typing discipline
Posted 02 March 2010 - 07:17 AM
Quote
Not with -Wall -Werror on~
Trying to put a float into an int makes it an error unless you cast.
Trying to put a float into an int makes it an error unless you cast.
That's gcc, not the language spec.
#10
Re: Preferred Typing discipline
Posted 02 March 2010 - 07:18 AM
I didn't say it was the language spec, it is GCC.
#11
Re: Preferred Typing discipline
Posted 02 March 2010 - 08:43 AM
I wish there was a defined choice between weak and strong typing because C/C++ would fall there.
#12
Re: Preferred Typing discipline
Posted 02 March 2010 - 09:23 AM
Isn't C++ more strongly typed than C?
#13
Re: Preferred Typing discipline
Posted 02 March 2010 - 09:24 AM
I like strong dynamic duck typing too
#14
Re: Preferred Typing discipline
Posted 02 March 2010 - 12:05 PM
Weak typing is a recipe for disaster.
#15
Re: Preferred Typing discipline
Posted 02 March 2010 - 12:25 PM
i language when you dont have to care so much about casting. i will have to go with Dynamic. a waste of time is a waste of time.

New Topic/Question
Reply



MultiQuote







|