Cero

Hi!

I created a small flavour of C++ that I found useful and I thought I'd like to share. It's called Cero and is basically C++ without curly braces and semicolons plus some additional stuff.
See more at http://cero-lang.org

Thoughts?

-- Henrik
For me, you've removed a lot of the stuff which I think makes C++ easy to read.
Ha ha!
The dubious sensibility to indentation of Python, now with all the ugliness of C++!

I do like the +++ private / +++ public feature but you should probably change them to something less ugly, maybe like [internal] and [external].

I built the cero compiler on Windows by using nuwen's MinGW distro (the old 32-bit one).
However when trying to use cero it gives some stupid errors, although it correctly generates the .cpp and .h files in the build folder.

C:\cero_test>cero.exe b main.ce
syscall: mkdir -p build
created build/base.h
created build/vec3d.cpp
created build/vec3d.h.-decl
created build/vec3d.h
syscall: ( cd build; g++ -Wall -O3 -std=c++11 -c -c vec3d.cpp )
The system cannot find the path specified.

Indeed python is an inspiration. :-) It takes some getting used to to read code where indentation marks code blocks but once you're familiar, I think it's easier. But this will always be a matter of taste.

Yeah, maybe [public] and [private] looks better. Perhaps I should change +decl to [+decl] and -decl to [-decl] too. I used the +++ signs to make those markers stand out more in the code, but the [] does look better. Will give it some thought.

I have no idea why MinGW says "cannot find path" but on Linux, the system() call executes the string in a shell (/bin/sh) and I guess the MinGW version of system() executes cmd.exe or something. As mentioned, no support for Windows yet but it really should be trivial to fix.

-- Henrik
Thought long and hard and now the keywords have been changed... :-) Better change them now than letting the wrong ones stick...
The new keywords in [] are actually easier to see, I think.

-- Henrik
Last edited on
Topic archived. No new replies allowed.