should statements having no effect be allowed?

This is a discussion on should statements having no effect be allowed? within the C++ Programming forums, part of the General Programming Boards category; >> Do you propose support for a pre-processor as well? absolutely. my goal is to support most (if not all) ...

  1. #16
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,652
    >> Do you propose support for a pre-processor as well?

    absolutely. my goal is to support most (if not all) of the language.

    >> Because things like this could easily result in empty statements with varying conditional compilation flags. LOGMSG may or may not be a macro which may or may not expand to nothing.

    good point. I somehow overlooked that use of the pre-processor but yes, that would certainly qualify as a legitimate use for an empty statement.

    >> Tell us about this language, Seb!

    it's basically C++ with some improvements and extensions that (I feel) support a more powerful programming paradigm. some basic features include:

    - no need for forward declaration of classes/functions
    - assignment in class member declarations allowed
    - functions within functions allowed
    - guaranteed sizes for integer/float data types regardless of platform used
    - a standardized intermediate 'portable opcode description' (POD) format for compiled code
    - reassignable references
    - overload of '.' allowed
    - optional '@' in place of '=='
    - addition of operator pow '`'
    - the template right angle bracket spacing problem remedied
    - nested multiline comments
    - arbitrary length integer and floating point literals
    - automatically deduced types in declarations with 'auto' and 'typeof' keywords
    - more simplified template usage syntax
    - keyword 'with' for structure access

    there's still much to do, of course - the only thing near complete is the lexical scanner.
    Code:
    #include <ip.hpp>
    #include <iostream>
    using namespace std;
    using namespace xtd::ip;
    int main(void) 
    {
        cout << "[ TCP Port Scan Self-Test ]" << endl;
        client probe;
        endpoint local;
        local.address = "127.0.0.1";
        local.protocol = IPPROTO_TCP;
        for(local.port = 0; local.port < (1 << 16); ++local.port)
        {
            if(probe.open(local))
                cout << "Listening: ";
            else
                cout << "No Response: ";
            cout << local.port << endl;
        }    
    }

  2. #17
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    So when it's ready how are you going to release it? I guess you'll release it on some forums first so people can test it rigorously then... GPL?
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unknown memory leak with linked lists...
    By RaDeuX in forum C Programming
    Replies: 6
    Last Post: 12-07-2008, 03:09 AM
  2. C++ If Statements Help
    By moporho in forum C++ Programming
    Replies: 19
    Last Post: 01-18-2008, 07:40 AM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  4. Efficiency of case statements
    By Yasir_Malik in forum C Programming
    Replies: 26
    Last Post: 05-23-2006, 11:36 AM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21