Preferred Typing discipline

Static, Dynamic, Explicit, Implicit/Duck, Strong, Weak

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

31 Replies - 2475 Views - Last Post: 04 March 2010 - 09:18 PM

Poll: Typing discipline (21 member(s) have cast votes)

Which discipline(s) do you prefer?

  1. Static (4 votes [7.55%] - View)

    Percentage of vote: 7.55%

  2. Dynamic (11 votes [20.75%] - View)

    Percentage of vote: 20.75%

  3. Explicit (8 votes [15.09%] - View)

    Percentage of vote: 15.09%

  4. Implicit/Duck (11 votes [20.75%] - View)

    Percentage of vote: 20.75%

  5. Strong (18 votes [33.96%] - View)

    Percentage of vote: 33.96%

  6. Weak (1 votes [1.89%] - View)

    Percentage of vote: 1.89%

Vote Guests cannot vote

#1 programble  Icon User is offline

  • (cons :dic :head)

Reputation: 49
  • View blog
  • Posts: 1,315
  • Joined: 21-February 09

Preferred Typing discipline

Posted 01 March 2010 - 12:10 PM

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.

Is This A Good Question/Topic? 1
  • +

Replies To: Preferred Typing discipline

#2 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 610
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

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

Was This Post Helpful? 0
  • +
  • -

#3 WolfCoder  Icon User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 781
  • View blog
  • Posts: 7,604
  • Joined: 05-May 05

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.

This post has been edited by WolfCoder: 01 March 2010 - 09:03 PM

Was This Post Helpful? 0
  • +
  • -

#4 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 877
  • View blog
  • Posts: 3,122
  • Joined: 12-May 09

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.
Was This Post Helpful? 0
  • +
  • -

#5 programble  Icon User is offline

  • (cons :dic :head)

Reputation: 49
  • View blog
  • Posts: 1,315
  • Joined: 21-February 09

Re: Preferred Typing discipline

Posted 01 March 2010 - 09:49 PM

So I think we all agree that weak typing is bad.
Was This Post Helpful? 0
  • +
  • -

#6 dorknexus  Icon User is offline

  • or something bad...real bad.
  • member icon

Reputation: 1255
  • View blog
  • Posts: 4,618
  • Joined: 02-May 04

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.
Was This Post Helpful? 0
  • +
  • -

#7 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 877
  • View blog
  • Posts: 3,122
  • Joined: 12-May 09

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!
Was This Post Helpful? 0
  • +
  • -

#8 WolfCoder  Icon User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 781
  • View blog
  • Posts: 7,604
  • Joined: 05-May 05

Re: Preferred Typing discipline

Posted 02 March 2010 - 07:16 AM

View PostDark_Nexus, on 02 March 2010 - 02:12 AM, said:

...C and C++ are weakly typed languages...


Not with -Wall -Werror on~
Trying to put a float into an int makes it an error unless you cast.
Was This Post Helpful? 0
  • +
  • -

#9 dorknexus  Icon User is offline

  • or something bad...real bad.
  • member icon

Reputation: 1255
  • View blog
  • Posts: 4,618
  • Joined: 02-May 04

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.


That's gcc, not the language spec.
Was This Post Helpful? 0
  • +
  • -

#10 WolfCoder  Icon User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 781
  • View blog
  • Posts: 7,604
  • Joined: 05-May 05

Re: Preferred Typing discipline

Posted 02 March 2010 - 07:18 AM

I didn't say it was the language spec, it is GCC.
Was This Post Helpful? 0
  • +
  • -

#11 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3088
  • View blog
  • Posts: 19,136
  • Joined: 14-September 07

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.
Was This Post Helpful? 0
  • +
  • -

#12 programble  Icon User is offline

  • (cons :dic :head)

Reputation: 49
  • View blog
  • Posts: 1,315
  • Joined: 21-February 09

Re: Preferred Typing discipline

Posted 02 March 2010 - 09:23 AM

Isn't C++ more strongly typed than C?
Was This Post Helpful? 0
  • +
  • -

#13 dom96  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 256
  • Joined: 29-December 08

Re: Preferred Typing discipline

Posted 02 March 2010 - 09:24 AM

I like strong dynamic duck typing too
Was This Post Helpful? 0
  • +
  • -

#14 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 610
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Preferred Typing discipline

Posted 02 March 2010 - 12:05 PM

Weak typing is a recipe for disaster.
Was This Post Helpful? 0
  • +
  • -

#15 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 463
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

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.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3