Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Meaning of 'type-safe'??

  • 19-04-2004 12:49pm
    #1
    Registered Users, Registered Users 2 Posts: 1,253 ✭✭✭


    what does the term 'type-safe' refer to when talking about collections in microsoft visual c++ (6.0)??

    cheers...

    edit: for example, when talking about lists, arrays, or maps.


Comments

  • Closed Accounts Posts: 5,564 ✭✭✭Typedef


    It means you pay me homage, with trinkets, small gifts, shiny metalic objects called tender, sisters &/or small furry animals.


  • Registered Users, Registered Users 2 Posts: 21,084 ✭✭✭✭Stark


    It means you define a variable to explicity hold data of one type and it can't store anything but that type of data (mostly).

    For example in a language like php which isn't type-safe you can have
    $p = "hello"
    $p = 123;

    Whereas say in Java you have

    String s;
    s="Hello";
    s = 123 (can't do this).

    Well technically that's strong-typing but I think type-safe is roughly the same thing.

    If it's type-safe you can also only perform actions on a data type which were meant for that data-type. For example if you're collect has a String in a[1] and an Integer in a[2] then you can do a[1].length() but not a[2].length()


  • Registered Users, Registered Users 2 Posts: 1,253 ✭✭✭gobby


    that seems to make sense stark, cheers.

    typedef, trinkets are on their way. no sisters im afraid so im sending you a yak.


  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    Theres a nice, short explanation of type-safe here

    jc


  • Registered Users, Registered Users 2 Posts: 1,253 ✭✭✭gobby


    Originally posted by bonkey
    Theres a nice, short explanation of type-safe here

    jc
    cheers jc... :)


  • Advertisement
Advertisement