Results 1 to 4 of 4

Thread: Why not add DBC feature to Slice?

  1. #1
    microweb is offline Registered User
    Join Date
    Dec 2003
    Posts
    2

    Why not add DBC feature to Slice?

    Recently, Design by Contract has been accepted by many develop,
    Slice,as a new approch, why not add the important feature ?

  2. #2
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    Can you elaborate on this please? What exactly should Ice support? "Design by Contract" is just a buzz word, and can mean lots and lots of things...

  3. #3
    microweb is offline Registered User
    Join Date
    Dec 2003
    Posts
    2
    For instance, to add some attribute description can enhance the interface signature which support the pre-condition(Require), post-condition(Ensure) or the invariant ... When ice generate the cpp/head files, it also generate the assert conditions. So it can reduce many trivial coding works and make the code more consistant

  4. #4
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    Hmm... given that in many cases object state is not expressed in Slice, I'm not sure how this can work. What would for example invariants test, if an Ice object is only defined by an interface, but not by a class with data members?

    I guess what Slice could do is to add range check for parameters, i.e. a limited form of pre- and post-conditions. But this would require a much more sophisticated expression evaluator in Slice, especially when it comes to complex data types (e.g., checking for certain values or ranges in a sequence element, which is a member of a struct, which is contained in a dictionary).

    This could become complicated very quickly, so that in the end Slice is not a specification language anymore, but a rather an implementation language.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 233
    Last Post: 04-06-2012, 01:31 PM
  2. Ice 3.3 Feature Discussion
    By mes in forum Comments
    Replies: 18
    Last Post: 04-02-2008, 12:42 PM
  3. Replies: 2
    Last Post: 03-03-2008, 11:10 PM
  4. Replies: 0
    Last Post: 04-20-2007, 01:36 PM
  5. platform feature matrix
    By dlyall in forum Comments
    Replies: 0
    Last Post: 09-02-2004, 03:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •