1. 24

  2. 5

    If one wants “High Level C”, they should probably look at D with “-betterC” flag options, which allows you to use high level language features without the “penalty” of a runtime and GC.

    See: http://www.active-analytics.com/blog/interface-d-with-c-fortran/

    • no GC
    • no runtime
    • super easy FFI
    • mixins
    • template programming
    1. 2

      “however at the time of writing this article, the flag is partially implemented and removes only module information. “

      so does it turn off the runtime and GC?

      1. 3

        You can disable the runtime and GC, but you need to do more than just using the -betterC flag.

    2. 7

      This is the worst abuse of the C language I have ever seen. Even worse than various coroutine or closure libraries.

      1. 1


        1. 6

          “I made Cello as a fun experiment to see what C looks like hacked to its limits. As well as being a powerful library and toolkit, it should be interesting to those who want to explore what is possible in C.”

          1. 1

            Yeah, but C++ was also originally a PhD student’s project to expand C as well, was it not?

            1. 5

              Not exactly. It came later, and notably wasn’t just a pile of macros. It worked by extending the compiler.

      2. 4

        What are the benefits of using something like Cello, when we have stuff like Rust, C++, Nim, D and so on? What I see from the examples looks quite interesting, but I’m not yet doing much C programming.

        1. 13

          Well, for one, if you don’t actually want to stop using C, this is not a new language, it’s just a library. For many that would be a benefit.

          1. 8

            Cello is a sort of dynamic object layer on top of C, and does dispatch at runtime. The other languages you list have more sophisticated type systems which are compiled statically.

            I’d have to say Cello’s biggest plus is that it’s conceptually lightweight.

            1. 5

              This is more like Objective-C than C++, Rust, etc.