I think that languages that are a just thin shell on top of C (as opposed to languages that merely target C, e.g. Chicken Scheme) might have some potential. I'll call this coffeescriptification --still eagerly awaiting the first transpiled language that does nothing but remove C's braces and semicolons. If someone doesn't do it by next April Fools, I certainly will (I already have the name in mind: Glee (the italics…
Sounds like what you're looking for is the original Bash source code, circa 1977, for example [1]: LOCAL STRING copyto(endch) REG CHAR endch; { REG CHAR c; WHILE (c=getch(endch))!=endch ANDF c DO pushstak(c|quote) OD zerostak(); IF c!=endch THEN error(badsub) FI } Applicable macros if you want to give your code that classic ALGOL 68 smell in [2]. [1] http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/... [2]…
C (Cbang) - A system oriented programming language
11–20 of 86 posts
Re: C (Cbang) - A system oriented programming language
#12D and Go are not trying to provide us with a better C, because they don't share the concept of, a language that translates straightforward to assembler, but still is designed so that you can mount good abstractions with it.
This is what you need for kernel programming, embedded systems, and a good deal of system programming as well.
At the same point C is one of the top-used languages in the world, with a vast code base, and yet almost all the attempts in the languages area are about much higher level or exoteric stuff. Not that I don't want that kind of research, but it's bizzarre that no one is focusing where a lot of meat is.
I bet this better C will arise in a few years at max, and it is not going to come from academia. Times are mature apparently, there is even a C conf this year ;)
Re: C (Cbang) - A system oriented programming language
#13How about a few more default data structures, like resizable arrays or hashes? I find the biggest bump in my productivity in most other languages is that those two things are there already.
It's not impossible to do right though, C++ has "allocators" parameter templates to do exactly that (there's a default implementation that you can "override" with a custom class).
Re: C (Cbang) - A system oriented programming language
#14How about a few more default data structures, like resizable arrays or hashes? I find the biggest bump in my productivity in most other languages is that those two things are there already.
The problem is dynamic memory allocation. It's actually one of the gripes I have with the "rust" language [1]. As a C coder I find it hard to take seriously a language that don't let me customize memory allocation easily. It's not impossible to do right though, C++ has "allocators" parameter templates to do exactly that (there's a default implementation that you can "override" with a custom class). [1] https://news.y…
Re: C (Cbang) - A system oriented programming language
#15I have a couple of problems with their analysis of C. There's no typed macros There are inlined functions... While the type system of C is basically size based, a lot of types have an ambiguous size (int for example) Use stdint.h definitions. Having said that, I would like namespaces in C!
But they've identified this as for systems based programming where you don't have any guarantee of stdint.h holding true (POSIX compliance). Their implementation is much more flexible. Albeit slightly reinventing the wheel.
You should be coding to(or with) the OS you're working on. If you're doing multiplatform stuff, then #defines with a naming scheme work, and are already the standard practice.
Re: C (Cbang) - A system oriented programming language
#16Example based on the syntax from the article:
x: int;
x[0:6] = 42; // Set six bits starting with lsb 0 to 42Re: C (Cbang) - A system oriented programming language
#17I didn't checked the details, but I would love to see ten attempts every year, trying to solve the same problem. D and Go are not trying to provide us with a better C, because they don't share the concept of, a language that translates straightforward to assembler, but still is designed so that you can mount good abstractions with it. This is what you need for kernel programming, embedded systems, and a good deal of…
What about languages like Cyclone, decac, Clay?
Re: C (Cbang) - A system oriented programming language
#18Re: C (Cbang) - A system oriented programming language
#19What could be more tedious than another low-level language based on subtle complaints about C?
Re: C (Cbang) - A system oriented programming language
#20How about a few more default data structures, like resizable arrays or hashes? I find the biggest bump in my productivity in most other languages is that those two things are there already.
The problem is dynamic memory allocation. It's actually one of the gripes I have with the "rust" language [1]. As a C coder I find it hard to take seriously a language that don't let me customize memory allocation easily. It's not impossible to do right though, C++ has "allocators" parameter templates to do exactly that (there's a default implementation that you can "override" with a custom class). [1] https://news.y…
http://smallcultfollowing.com/babysteps/blog/2012/04/25/refe...