If nothing helps, you could also see if throwing and catching an exception
works. In the posted example you could throw an exception at "from here" and
catch it at "here we go". But abusing exceptions like this is very bad style
and should only be used as a last resort.
Well, yeah, stronger type checking would be worth it. Maybe Linus would do the
switch if he know how to keep the programmers from using the other features of
C++. As I remember it, Linus didn't want C++ because because the programmers
could be tempted to do "OO model crap".
Note that _Gemeinnützigkeit_ is not the same as non-profit. A Verein has to be
non-profit to be registered but for being _gemeinnützig_ it has to have some
charitable purpose. I doubt that supporting the development of a programming
language is a charitable purpose under German tax law.
A Stiftung (foundation) is basically some amount of money dedicated to some
purpose whereas a Verein (association) is a group of people pursuing some
purpose.
A Verein is usually democratic but it doesn't have to - the by-laws can
restrict the participation of members to a great extent but not
The SQLite 3 interface has a call sqlite3_column_int() which returns a column
value of a result row as an int. So if one calls this function from Nim the
result should be available as an int, not a string.
(Just reading the API documentation, didn't try it myself)
The Nim db_* database wrappers always return column data as strings. If you
want to get an int from an INT column you either have to use parseInt() or you
must use a different interface.
Prepared statements are now supported.
Currently NimternalSQL does not provide prepared statements. This might be a
problem for Ormin. IMHO they don't provide much benefit when the database is
in-memory. But if they are needed for interoperability it should be not a big
deal to add prepared statements.
It would be an interesting undertaking to design a "Nim Query Language" which
can be embedded using macros. To support existing DBMSs it would have to be
implemented on top of SQL.
The [in-memory database library](https://github.com/rehartmann/nimternalsql)
I've been working on during the recent months is now on Github.
Persistence is provided through snapshots. For the future I'm planning to add
the ability to restore data from a transaction log.
Tables are implemented u
If there's a number of conditions to be checked before a proc does any actual
work, then having to use if-else is cumbersome. But in this case it's quite
likely that exceptions are being thrown instead of returning error values.
I'm working on an in-memory SQL database in pure Nim. It's in a too early stage
yet for a public repository.
An alternative would be to call strcoll() from the C standard library.
Of course this works only if the encoding of your locale setting matches the
encoding of the strings passed to strcoll(). This used to be a problem on
Windows which did't support UTF-8 locales. But now Windows 10 seems to sup
I noticed that iterators cannot be polymorphic. I can work around this using
checking the type using _of_ , but this feels a bit like a hack.
Why can't iterators be polymorphic? Is there a more elegant workaround? Did I
miss something?
14 matches
Mail list logo