Thread: Do you ever feel you want OOP done with the C way of doing things?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2020
    Posts
    12
    Dude templates are one of *the* good things in C++ that I wish were available in some at least limited capacity in C. I'd much rather use macro tricks to replicate templates than void*s and loose type safety (and for primitive types, performance).

  2. #2
    null pointer Structure's Avatar
    Join Date
    May 2019
    Posts
    338

    Lightbulb Object Oriented Programming

    Do you ever feel you want OOP done with the C way of doing things?-sitepic-jpg

    Code:
    // includes;
    "stdio.h";
    
    // person structure;
    person! {
      $firstName[20];
      $lastName[20];
    };
    
    @{
      // create objects using person structure;
      person1 = !person;
      person2 = !person;
      person3 = !person;
    
      // define object values;
      person1.firstName = "First";
      person1.lastName = "Person";
      person2.firstName = "Second";
      person2.lastName = "Person";
      person3.firstName = "Third";
      person3.lastName = "Person";
    
      // display lastName, firstName of each object;
      ink $person1.lastName "," $person1.firstName "\n";
      ink $person2.lastName "," $person2.firstName "\n";
      ink $person3.lastName "," $person3.firstName "\n";
    
    };
    Hyper C Compiler
    "without goto we would be wtf'd"

  3. #3
    Registered User Sir Galahad's Avatar
    Join Date
    Nov 2016
    Location
    The Round Table
    Posts
    277
    Quote Originally Posted by Structure View Post
    Do you ever feel you want OOP done with the C way of doing things?-sitepic-jpg

    Code:
    // includes;
    "stdio.h";
    
    // person structure;
    person! {
      $firstName[20];
      $lastName[20];
    };
    
    @{
      // create objects using person structure;
      person1 = !person;
      person2 = !person;
      person3 = !person;
    
      // define object values;
      person1.firstName = "First";
      person1.lastName = "Person";
      person2.firstName = "Second";
      person2.lastName = "Person";
      person3.firstName = "Third";
      person3.lastName = "Person";
    
      // display lastName, firstName of each object;
      ink $person1.lastName "," $person1.firstName "\n";
      ink $person2.lastName "," $person2.firstName "\n";
      ink $person3.lastName "," $person3.firstName "\n";
    
    };
    Hyper C Compiler

    Closed source AND highly platform specific? Yeah that's a real winner all right...

  4. #4
    null pointer Structure's Avatar
    Join Date
    May 2019
    Posts
    338

    Post

    Closed source
    Currently True.

    highly platform specific?
    There is currently only a windows build although not any windows platform specific code.

    Yeah that's a real winner all right...
    Possibly.

    Hyper C Compiler

    Just as any language was created for easier to read/write programs such is hyperC. Hyper C evolves the language to the next level and brings several improvements in code writing efficiency. HyperC is designed to streamline as much as possible; abstract lower-level commands with evolved parameter objects; as well as simplify program architecture.
    Closed source AND highly platform specific?
    These two things are completely irrelevant imo ? Both are trivial.



    Last edited by Structure; 04-26-2020 at 08:28 AM.
    "without goto we would be wtf'd"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do you feel...
    By ILoveVectors in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 08-16-2005, 05:47 AM
  2. I feel.....clean....
    By jdinger in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 04-11-2003, 06:46 PM
  3. win xp look&feel
    By aym_7 in forum Windows Programming
    Replies: 9
    Last Post: 05-11-2002, 08:28 PM
  4. I feel sorry for...
    By Betazep in forum A Brief History of Cprogramming.com
    Replies: 43
    Last Post: 11-25-2001, 03:50 AM
  5. I feel sorry for
    By Betazep in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-28-2001, 11:23 PM

Tags for this Thread