Christoffer Lerno
Christoffer Lerno
This is possible: ``` Foo foo = Foo; ``` Because we do not check during assignment whether Foo an expression-type or an expression with the type Foo.
The test has this: i32 a = sizeof(i32*) i32 c = sizeof(a*); This fails (correctly) since a is not a type (`sizeof(i32*)` succeeds as expected). However, one might have expected...
I was looking at this: https://github.com/c2hub/c2vector/blob/master/c2vector/c2vector.c2 And realized that maybe C2 needs a convention (or a way) to name / signal "internal" (I wouldn't use 'private') fields. There are a...
1. cast(3) => will cast the expression to a 31 bit integer. 2. cast(2147483648) => 0 3. cast(2147483647) => -1 4. cast(1073741823) = 1073741823 4. cast(1073741824) = -1073741824 The cast...
Not all of these should be available using dot syntax perhaps? [ ] shuffle (incl broadcast) [ ] blend (select) [x] pow [x] sin / cos [x] abs [x] log...
C3 needs some way to express inline asm. In GCC this is: ```c asm("... asm ..."); asm("... asm ...", , , , ); ```
It's currently possible to do: ```c enum Foo { ABC }; fn void main() { int x = 3; Foo y = (Foo)x; } ``` This should be an assert...
The idea is that such a struct may be converted into an array so this works. ``` tlocal char[] context_user = "safe"; macro long perform(task) { io::printf("%s: %s\n", context_user, task);...
`a[1..2] = b[0..1];` this should work.