Thread: What does typesafe mean in c++.

  1. #1
    Deleted Account
    Join Date
    Oct 2013
    Posts
    39

    What does typesafe mean in c++.

    what is meaning of typesafe in c++..........and what is type safety...........plese explain with examples

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Type safety is a concept from computer science (more specifically with programming language design and compiler design) not C++ specifically. C++ is one of several programming languages with features concerned with type safety.

    Essentially, type safety refers to a collection of features of programming languages that permit a compiler to automatically detect programming errors in code by examining the types of data being acted on, reporting errors if mismatches occur, and (usually) refusing to build a program. If the compiler doesn't do this, the program is able to be built, shipped, and run ..... and errors that occur then are much harder (and expensive in terms of effort and time) for the programmer to track down and correct.

    Have a look here. It describes type safety, and even includes some C++ examples.
    Last edited by grumpy; 12-23-2013 at 07:42 AM. Reason: Fixed typos
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  4. #4
    Deleted Account
    Join Date
    Oct 2013
    Posts
    39
    thanks grumpy and
    k_mp5kpdw it was very helpfull

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Typesafe, generalized aliasing
    By CodeMonkey in forum C++ Programming
    Replies: 15
    Last Post: 12-13-2008, 09:52 PM
  2. typesafe callback system
    By gandalf_bar in forum C++ Programming
    Replies: 1
    Last Post: 05-22-2004, 06:35 AM