6 ms·
Nullc: Fast C-like programming language with advanced features
- personasdfghjkl 5y agoNitpick: break, return, import etc are statements, not expressions
- oleganza 5y agoFYI: nullc is a long-time username of Gregory Maxwell (here on HN, on Reddit and elsewhere too).
- convolvatron 5y agoI 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)
- karmakaze 5y ago> 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 5y agoMore 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.
- ModernMech 5y agoWork 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.
- spicybright 5y agoNot a great language to code anything not a toy in then.
- ModernMech 5y agoSure, but that's 99% of languages out there. If you are evaluating a language for a real project, it's best to stick to the top 50-100 languages on stack overflow. Out here in the wild west of programming languages though, questions like "can I use this for anything real" aren't really material. Of course you can't, and the irregularity of the developer is just one reason out of many. Nonetheless, people find themselves drawn to these languages because they can actually offer something those top 50-100 languages can't -- fresh takes on programming language design and philosophy. True, we may never build anything more than a toy in these smaller niche languages, but still we can bring the insights gained back to our development practices in those top 50 languages.
- api 5y agoWhy 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.
- adwn 5y agoBecause 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.
- netr0ute 5y agoIsn't this just a rebranded C++?
- me_me_me 5y agoNo, 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 5y agoGarbage collection is the antithesisto C. Yuck! If you want to offer an operating system so do it
- rzzzt 5y agoC gatekeeping!
- Brian_K_White 5y agowhat a strange charge
- spicybright 5y agoI read the above comments as tongue in cheek, but I see many arguments online that go like this for many different things. I'm not gatekeeping apples by saying a grape is not an apple, I'm debating how to classify these things.
- rcthompson 5y agoI'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?
- convolvatron 5y agoVM? 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.
- jb1991 5y agoI think the popular Nim language also does this.
- klyrs 5y agoIf 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).
- b3morales 5y agoThe README is mostly a changelog -- there is a "Language Reference" in the wiki: https://github.com/WheretIB/nullc/wiki/Language-Reference 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 5y agoI agree. This project is fascinating. It's unfortunate it doesn't have one of those cool websites with docs, examples and all.
- huhtenberg 5y agoThere is a language spec and it's quite comprehensive - http://svn.assembla.com/svn/SuperCalc/LanguageEN.html http://svn.assembla.com/svn/SuperCalc/LanguageEN.html
- gompertz 5y agoI 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.
- kf6nux 5y ago> 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.
- dainiusse 5y agoExactly. I think some people complain about Go's limitations. But this gives back in readability.
- randomNumber7 5y agoYes but then they created their own world of evil with the ducktyping aproach...
- mhh__ 5y agoThe readers who matter should not have any issue understanding your code. You don't have to make the code understandable to most readers i.e. off the street. If you make a function called add which actually subtracts, why is that any different to an operator overload?
- preseinger 5y agoThe measure of a successful software project is how long it takes an arbitrary programmer who has intermediate proficiency with the language and a reasonable understanding of the business domain to understand and become a productive contributor to the codebase.
- anonymoushn 5y agoThat sounds like a measure for successful software projects at deeply dysfunctional large companies that have fresh grads maintaining almost all of their software after the authors vanished. The whole attitude (and the Go programming language) is maybe downstream from the fact that perf/promo criteria punish people who maintain the software they write.
- nullc 5y agoNot sure how I feel about this!
- kwertyoowiyop 5y agoAt the top of the first page of every “new language” link there should be some source code examples!