Byron Heads

Results 10 comments of Byron Heads

This could be really cool if you can solve all the corner cases. How would the compiler handle allocating on the stack? http://man7.org/linux/man-pages/man3/alloca.3.html

Nim's password input ran into this as well https://github.com/Araq/Nim/pull/2137 Will see if I can get a PR today

Testing with this: ``` int getch(bool echo = false) { import std.algorithm : among; INPUT_RECORD ir; DWORD count; int result; auto m = mode; mode = ConsoleInputMode.None; scope(exit) mode =...

I love the idea overall, but wonder about the syntax a little. Defining the function and the function type is a little too close: ```C const A = fn(i32) void;...

@raulgrell That would also solve the ambiguity with braces in the return type.

I would also want to standardize names (printAlloc vs allocPrint, isXXXX setXXXX getXXXX findXXXX) and common param orders (ie is alloc always the first param except when passing self). Also...

I was just thinking that I could use attributes the other day, there are uses for more complicated tags. Ex: you could tag members of a struct for serialization: name,...

I was thinking something like this: something like json_required would be a parsing error if not found, or json_option is okay is missing json_id would change the mapping, json_type changes...

Using _ to pack data is interesting but relies on someone just knowing that these exists and its not really a solid pattern for tagging fields.

@Hejsil Like this even better