PRs are welcome.
I'm learning some features of the language, and I don't understand why in the
Standard Library, the Complex type would be defined as a tuple, when the
Rational type is defined as an object and allows generics? Shouldn't there be
some sort of consistency in the ways these libraries are
> Alternatively, use c2nim and use a regexp on the output
c2nim offers `#nep1` and `#mangle`, no need for post processing with regexes.
You can create a custom pragma and tag your proc with it.
It will get passed the proc AST, including the name so you can add h3d and
uppercase the first letter so that it matches the C API. I don't have a handy
example right now though.
Alternatively, use c2nim and use a regexp on the output .
Some library's C API functions look like this:
h3dAddResource
h3dDelResource
...
In my nim wrapper I use:
{.push dynlib:lib, importc:"h3d$1".}
proc AddResource(...)
proc DelResource(...)
{.pop.}
This appends "h3d" before proc name for C
> bitsets
a really nice macro? also, backend compiler optimizers are pretty good at
getting perf for these kinds of ops anyway, and with fewer features in the nim
compiler, there's more room in there for good compiler features - better error
messages, better transformations..
> exceptions,
* Dead code elim: make it the default
* bitsets: No, I agree with the other posters they are super useful. I can
squeeze lots of speed from them without thinking on how to reimplement
bitvector, shifts, masking and all that jazz.
* Exceptions. I think it really depends on the use case. I
> bitsets
I use them almost in every place, and I suppose the compiler does the same.
> exceptions
I would not remove them, but it piss me off when they are used in the stardard
modules. I'd rather check if the result is equals to -1 or is none than have to
handle an exception when trying to
> bitsets - why are these even in the language and not a library?
Because they're **SUPER USEFUL** in game development, and from what I can tell
lots of people use Nim for game development.
You need resistances in you RPG?
type
Element* = enum
eFire, eWater, eEarth,
"Perfection is Achieved Not When There Is Nothing More to Add, But When There
Is Nothing Left to Take Away"
With the specter of 1.0 approaching, it seems everyone is keen on squeezing
their favorite feature in, but it seems to me that one would perhaps be better
served by removing any and all
Surely, why not?
11 matches
Mail list logo