[HN Gopher] Nullc: Fast C-like programming language with advance...
       ___________________________________________________________________
        
       Nullc: Fast C-like programming language with advanced features
        
       Author : blacksqr
       Score  : 61 points
       Date   : 2021-11-25 15:49 UTC (7 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | rcthompson wrote:
       | I'm curious how it implements GC but compiles to C source. Does
       | it just emit the source for the entire VM as part of the output?
        
         | jb1991 wrote:
         | I think the popular Nim language also does this.
        
         | convolvatron wrote:
         | VM? if you use your own allocator its pretty straightforward to
         | run C code on a GC. there is of course Boehm, but its .. really
         | slow and pretty fussy. since you own the compiler in this case
         | you can even support object relocation (compaction) which does
         | really* help a lot in total performance as well as footprint.
        
         | klyrs wrote:
         | If you use Cython to compile vanilla Python, it implements GC
         | in the C source without the VM. I don't find that especially
         | noteworthy... though I do wonder about the particulars of their
         | GC implementation (though... ick, GC).
        
       | karmakaze wrote:
       | > nullc is a C-like embeddable programming language with advanced
       | features such as function overloading, operator overloading,
       | class member functions and properties, automatic garbage
       | collection, closures, coroutines, local functions, type
       | inference, runtime type information, modules, list comprehension,
       | enums, namespaces, generic functions and classes
       | 
       | Not exactly what I would call C-like in that it does a whole lot
       | more. It is C-like in the way many popular languages are, that
       | the syntax resembles C but that superficial similarity isn't
       | really worth noting. It may be good marketing to get people to
       | look at a new language though.
        
         | Santosh83 wrote:
         | More interesting tidbits:
         | 
         | > Language is type-safe and memory-safe.
         | 
         | > nullc library can execute code on a VM or translate it to x86
         | code for fast execution. It can also translate nullc files into
         | C source files.
         | 
         | But sadly, although the project has been around for 11 years,
         | development seems to have stalled since last year, at least
         | going by GitHub activity.
        
           | api wrote:
           | Why is activity the measure of product quality? If I write
           | something that works great and needs few updates is it
           | inferior to something that's broken and gets commits every
           | day?
           | 
           | This is just a terrible metric of software quality that
           | became standard without anyone discussing why.
        
             | karmakaze wrote:
             | I can make a guess why this might matter. For something
             | that's not already widely used, we start with the premise
             | that it is not finished in that it hasn't been exercised
             | enough to know it is. With that a lack of activity
             | indicates that edges are not being found and fixed. There
             | could be an argument made that the way the software is
             | developed and tested finds and fixes inconsistencies but
             | that would have to be illustrated and not accepted as a
             | given by statement alone.
        
             | zdragnar wrote:
             | > without anyone discussing why
             | 
             | Why does it need to be discussed? Not actively maintained
             | says it is either "done" or abandoned.
             | 
             | It is also a (weak) proxy for popularity, meaning if I do
             | run into an issue an active repo means I am more likely to
             | get help.
             | 
             | A quick glance at the git repo shows that it has builds set
             | up on travis that are failing, and an unanswered question
             | in the issue tracker. Neither of these inspire confidence
             | that it will "work great"
        
             | adwn wrote:
             | Because programming languages are different from regular
             | software: for a programming language to be useful, it needs
             | an ecosystem of libraries, package management, and IDE
             | support. It's not the 80s anymore, when everyone wrote
             | their own libraries anyway, maybe shared them with friends
             | or colleagues, and didn't expect anything beyond a small
             | standard library.
             | 
             | Today, a new language has a small window of a few years,
             | after which it either achieves escape velocity, or re-
             | enters the atmosphere and burns up. A new language which
             | hasn't received major updates for two years, is effectively
             | dead. It's a social phenomenon, not a technical one.
        
           | ModernMech wrote:
           | Work on long term projects like this tends to go in bursts.
           | Stalled activity for a year isn't unheard of. This project
           | had a lot of activity in 2011, stalled the better part of a
           | decade, and then had a burst of 1600+ commits last year. This
           | is the mark of a project that has renewed interest from its
           | author.
        
       | convolvatron wrote:
       | I scanned the readme.md and found a few c++ style features listed
       | in one of the earlier changsets. it would be helpful to have some
       | kind of statement regarding the intent (i.e. c++ with less bloat,
       | or novel type system, or whatever it is)
        
       | oleganza wrote:
       | FYI: nullc is a long-time username of Gregory Maxwell (here on
       | HN, on Reddit and elsewhere too).
        
       | gompertz wrote:
       | I always get curious about languages like this; but the only one
       | that ever stuck with me was the Pike programming language (circa
       | '94). Pawn seemed somewhat decent too.
        
       | kwertyoowiyop wrote:
       | At the top of the first page of every "new language" link there
       | should be some source code examples!
        
       | b3morales wrote:
       | The README is mostly a changelog -- there is a "Language
       | Reference" in the wiki:
       | https://github.com/WheretIB/nullc/wiki/Language-Reference
       | although it's still pretty terse and really just a catalog. Is
       | there an introductory document anywhere?
        
         | rasengan wrote:
         | I agree. This project is fascinating. It's unfortunate it
         | doesn't have one of those cool websites with docs, examples and
         | all.
        
       | kf6nux wrote:
       | > function overloading, operator overloading
       | 
       | I think Go took the right approach with calling those bugs to be
       | avoided rather than features to be implemented.
       | 
       | Don't be clever. Be understandable to most readers.
        
         | randomNumber7 wrote:
         | Yes but then they created their own world of evil with the
         | ducktyping aproach...
        
         | dainiusse wrote:
         | Exactly. I think some people complain about Go's limitations.
         | But this gives back in readability.
        
       | nullc wrote:
       | Not sure how I feel about this!
        
       | netr0ute wrote:
       | Isn't this just a rebranded C++?
        
         | me_me_me wrote:
         | No, its C with Extra features, or lesser C++.
         | 
         | Jokes aside, I might have a look at it over weekend, it would
         | be nice to see some PR materials on their git repo. Why should
         | one use it over C/Rust etc.
        
       | posterboy wrote:
       | Garbage collection is the antithesisto C. Yuck! If you want to
       | offer an operating system so do it
        
         | rzzzt wrote:
         | C gatekeeping!
        
           | Brian_K_White wrote:
           | what a strange charge
        
       ___________________________________________________________________
       (page generated 2021-11-25 23:00 UTC)