Thread: Class-C : new OOP C programming language

  1. #16
    Registered User milgra's Avatar
    Join Date
    Dec 2013
    Location
    Szeged, HUN
    Posts
    16
    phantomotap : very good example, and it exists in all languages, that's why it is a design problem rather than a language problem, it is called "over-object-orienting" In a case like this it's easier to put all methods in the Person class, and the headache is gone. The diamond problem is the same thing.

  2. #17
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    whiteflags : Yes, you are right, the introduction.pdf doesn't show too much examples, I'm planning on writing a few step-by-step tutorials. Until that, the demo projects ( the compiler and dynamicsX on github ) are the easiest way to understand how class-c works, the readme in those projects gives you a good hint on how to start. As the specification says, class-c is a very thin layer over C, and deals only with classes and instances, so the C compatibility depends on what compiler you use. The class-c compiler's source code is C89 compatible.
    I guess.

    Maybe I'm just harping on this too much, but your specification is written for the wrong audience. People who know nothing about your language should be able to read it, and it should contain everything that a person would want to know about your language. It is good to write it from that perspective, because other people would write compilers for it based on specification, and people like myself would read it to find out how it works and how to write in Class-C. Naturally, your specification is a rough draft, and I was rather disappointed. You obviously thought this was ready for people who aren't you to read.

  3. #18
    Registered User milgra's Avatar
    Join Date
    Dec 2013
    Location
    Szeged, HUN
    Posts
    16
    Quote Originally Posted by whiteflags View Post
    I guess.

    Maybe I'm just harping on this too much, but your specification is written for the wrong audience. People who know nothing about your language should be able to read it, and it should contain everything that a person would want to know about your language. It is good to write it from that perspective, because other people would write compilers for it based on specification, and people like myself would read it to find out how it works and how to write in Class-C. Naturally, your specification is a rough draft, and I was rather disappointed. You obviously thought this was ready for people who aren't you to read.
    Have you read the Introduction.pdf? I wrote it for that purpose, I agree that the Specification.pdf is way too dry and simple.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by milgra View Post
    ...because I hope that there are a few minds like me out there amongst the 7 billion
    I sure hope there aren't.
    Designing a new language is not trivial and certainly not helpful in 99% of the cases. Especially when you just want to dig out stuff that already exists in already established successful languages.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #20
    Registered User milgra's Avatar
    Join Date
    Dec 2013
    Location
    Szeged, HUN
    Posts
    16
    Quote Originally Posted by Elysia View Post
    I sure hope there aren't.
    Designing a new language is not trivial and certainly not helpful in 99% of the cases. Especially when you just want to dig out stuff that already exists in already established successful languages.
    Hah, successful langauges C++ became popuplar because it was the default development language of Windows, Objective-C became popupar when the iOS App Store became succesful - not because they are so awesome languages. I think C was the last C-like language that became succesful on its own. Just check TIOBE index, there is no company behind C, and it is still the most popular.

    And being satisfied with things you are considering okay, and not trying to make something better - that's the end of innovation.
    Last edited by milgra; 12-10-2013 at 12:53 PM.

  6. #21
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    All languages have their flaws - it is inevitable. A language does not need to be awesome (but C++ still is awesome, though ), but practical. It needs to work. It needs tools. It needs compilers. It needs to make things work.
    Quote Originally Posted by milgra View Post
    And being satisfied with things you are considering okay, and not trying to make something better - that's the end of innovation.
    Absolutely, but you are aware that current languages (C, C++, Java, C#, etc...) are evolving, yes? Yes, sometimes a new language is necessary. But to pull that off requires a lot of resource and a lot of work, and frankly, it needs to fill some practical requirements. Why should I choose it over some other language? If it cannot find that, then it pretty much doomed to failure outside some niche sector.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #22
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    A language does not need to be awesome (but C++ still is awesome, though )
    says Elysia as he turns toward Bjarne's house to pray. Our god is an awesome god! Hallelujah!

    Yes, sometimes a new language is necessary.
    Sometimes they're fun. Brainfcuk, Whitespace, and chef weren't made for utility but for fun.

    But to pull that off requires a lot of resource and a lot of work, and frankly, it needs to fill some practical requirements. Why should I choose it over some other language? If it cannot find that, then it pretty much doomed to failure outside some niche sector.
    If I can play devil's advocate: I'm conflicted. I don't care enough to tell him to stop working on his language. It's just very underdeveloped at this point, and if I may say so, doesn't seem to be a language-in-itself, like running brainfcuk only needs a brainfcuk interpreter, Class C is C. Not so good. Even if it innovated nothing and just made the choices N+1, the fact is it's not even doing that.

  8. #23
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by whiteflags View Post
    If I can play devil's advocate: I'm conflicted. I don't care enough to tell him to stop working on his language. It's just very underdeveloped at this point, and if I may say so, doesn't seem to be a language-in-itself, like running brainfcuk only needs a brainfcuk interpreter, Class C is C. Not so good. Even if it innovated nothing and just made the choices N+1, the fact is it's not even doing that.
    Well, like I said, it's fine to develop something for fun. If you aren't creating a language for practical purposes, but just for fun or fooling around, I have no objections.
    I don't like the idea of people trying to start a new language that they're going to use for development simply because they don't like how an existing language is formed.
    Anyway, yeah, I merely wanted to inquire the reason as to why creating this, not to impede its progress or anything like that.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #24
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by milgra View Post
    Hah, successful langauges C++ became popuplar because it was the default development language of Windows
    C was the default language of windows development for many, many years. in fact, the majority of the Win32 API base is essentially a C API, even COM.

    Objective-C became popupar when the iOS App Store became succesful - not because they are so awesome languages. I think C was the last C-like language that became succesful on its own. Just check TIOBE index, there is no company behind C, and it is still the most popular.
    there is no company behind C++ either. it is an international standard, maintained by representatives of universities, corporations, and other independent organizations. the C standard is no different from C++ in this regard.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  10. #25
    Registered User milgra's Avatar
    Join Date
    Dec 2013
    Location
    Szeged, HUN
    Posts
    16
    Gosh, you act like I want to change every programming language of the world to class-c As I said in my opening post - maybe you find it useful. Maybe not. It is extremely useful and practical for me and it's useless for you.

    But I'm not alone with my problems, for example, GObject/Vala was created because of the same reasons. I've just created my own version of an OOP extension.

    Anyway, I wanted opinions, and I got them, thank you!

  11. #26
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    OP, you have a lot of misconceptions.

    For one, C++ is not popular because of Windows. I guess Windows did saturate the market but that doesn't mean it created a new a programmer out of every user.

    Second, I get that trying to write your own OOP code for C is cool 'n' all but let's be real, what you're making is probably not more useful than C++.

    You're dismissing an entire language just because you feel like it imports more than you're using. Well, I guess that's only true if you use "usning namespace std;" otherwise, you only bring in what you use.

    I get that you're probably doing this because it's fun and that's great. You're going to learn a lot and that's wonderful. But what you should know now is, this is only for fun. But if you wanna talk real code vs. real code, C++ and Java would probably put you in your place unless you're arrogant enough to believe that you alone created a better OOP implementation than they did.

    Sorry, I realize I sound mean and I think am being mean but at the same time, you sound really full of yourself or at least post 20 kind of make it sound like you have delusions of grandeur.

    So assuming you're super serious, consider this. You have competition for your language to compete against. Let's consider just C-like languages. This includes (to me) C, C++, Objective C, C# and Google's Dart which converts C-style code to Javascript so finally, C programmers can join the rest of the programming world which is web coding. Yay, the light! Thank you, Google.

    And then you have various OOP languages such as C++, Java, and just too many for me to have ever realized... List of object-oriented programming languages - Wikipedia, the free encyclopedia

    So, what do you want yours to do that's going to be superior for the user? Which grammars do you hate and what does implementing the ones you like actually mean implementing? Like, what will your ideas actually require you to do? Will they all mesh together? How out of your way will handle what the user writes?

    So why should I ever choose your language over an already established one that has a visible and known history?

    I'm not actually expecting an answer but I would think about things like this if I were serious about actually competing to have my language be remembered and used.

  12. #27
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    No one designed a car without spending years studying existing cars to every little detail.

    Similarly, most people who design new useful languages are already extremely knowledgeable with existing languages. That's how they are able to come up with useful languages, that don't just reinvent wheels, but are actually more useful than other languages in specific circumstances.

    If you are interested in programming language design (which is definitely a worthy thing), I would recommend starting by studying as many existing languages as you reasonably can, in as much detail as possible, before starting to work on your own language.

  13. #28
    misoturbutc Hodor's Avatar
    Join Date
    Nov 2013
    Posts
    1,787
    Geez. The guy implemented a language (extension) because he felt there was a need. Why the negativity? Nobody is forcing anybody to use it. I think it's neat.

  14. #29
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    There are valid criticisms critiques but it seems the comments by MutantJohn could be said literally of any new language. Obviously if everyone thought this way we would still all be using FORTRAN or something

  15. #30
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Quote Originally Posted by Hodor View Post
    Geez. The guy implemented a language (extension) because he felt there was a need. Why the negativity? Nobody is forcing anybody to use it. I think it's neat.
    The thread is mostly valid criticism, which was solicited, unless you want to argue that.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Which programming language?
    By Kranky in forum C++ Programming
    Replies: 6
    Last Post: 10-17-2012, 10:46 AM
  2. AI Programming language
    By knightjp in forum General AI Programming
    Replies: 37
    Last Post: 11-30-2008, 12:46 PM
  3. What's the Difference Between a Programming Language and a Scripting Language?
    By Krak in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 07-15-2005, 04:46 PM
  4. D programming language
    By silk.odyssey in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 01-07-2005, 08:58 AM
  5. which programming language should be used for socket programming?
    By albert_wong_bmw in forum Networking/Device Communication
    Replies: 8
    Last Post: 06-04-2004, 08:12 PM