You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The C programming language allows enumeration constants like this one:
enum { foo, bar = foo };
In Perl 6, that would correspond to:
enum ("foo", bar => foo);
Currently, such code dies like this:
===SORRY!=== Error while compiling -e
Undeclared routine:
foo used at line 1
I did not see it tested anywhere in S12-enum/, which means either that I failed to find it, that Perl 6 is not meant to behave as C in that regard, or that it was involuntary omitted.
The second case would be LTA imho. I stumbled upon such kind of enum while looking at a header file for the Vulkan 3D graphics API. I don't look at C header files very often so the fact that I've seen this construction suggests that they are not very rare. I believe Perl 6's enumeration constants should behave similarly as their C counterparts, since that would help the translation of C header files for NativeCall bindings.
The text was updated successfully, but these errors were encountered:
The C programming language allows enumeration constants like this one:
In Perl 6, that would correspond to:
Currently, such code dies like this:
I did not see it tested anywhere in S12-enum/, which means either that I failed to find it, that Perl 6 is not meant to behave as C in that regard, or that it was involuntary omitted.
The second case would be LTA imho. I stumbled upon such kind of enum while looking at a header file for the Vulkan 3D graphics API. I don't look at C header files very often so the fact that I've seen this construction suggests that they are not very rare. I believe Perl 6's enumeration constants should behave similarly as their C counterparts, since that would help the translation of C header files for NativeCall bindings.
The text was updated successfully, but these errors were encountered: