Recs.
Updated
SpecsUpdate
Pros
Pro Easy to integrate with another languages
You can use Nim with any language that can be interfaced with C.
There's a tool which helps you to create new C and C++ bindings for Nim - c2nim.
Also you can use Nim with Objective C or even JavaScript (if you're compiling for these backends).
Cons
Con Failed wannabe Python knockoff language
Created in 2008, Nim has failed to make TIOBE top 100 or PYPL rankings for programming languages. Pythoners can use alternatives like Cython or the Codon compiler for a more Python-like experience.
Con Generates unreadable C code with lots of extra bloat
var users = [
User(name: "Carl", last_name: "Black", age: 22),
User(name: "Sam", last_name: "Johnson", age: 23)
]
If we build this with nim c -d:release test.nim, we get
STRING_LITERAL(TM_R8RUzYq41iOx0I9bZH5Nyrw_5, "Carl", 4);
STRING_LITERAL(TM_R8RUzYq41iOx0I9bZH5Nyrw_6, "Black", 5);
STRING_LITERAL(TM_R8RUzYq41iOx0I9bZH5Nyrw_7, "Sam", 3);
STRING_LITERAL(TM_R8RUzYq41iOx0I9bZH5Nyrw_8, "Johnson", 7);
NIM_CONST tyArray_m9aGbgPB3gZgFcKcDkjg9a8g TM_R8RUzYq41iOx0I9bZH5Nyrw_4 = { { ((NimStringDesc) &TM_R8RUzYq41iOx0I9bZH5Nyrw_5), ((NimStringDesc) &TM_R8RUzY
q41iOx0I9bZH5Nyrw_6), ((NI) 22)},
{((NimStringDesc) &TM_R8RUzYq41iOx0I9bZH5Nyrw_7), ((NimStringDesc) &TM_R8RUzYq41iOx0I9bZH5Nyrw_8), ((NI) 23)}}
;
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
TFrame FR_; FR_.len = 0;
}
nimRegisterGlobalMarker(TM_R8RUzYq41iOx0I9bZH5Nyrw_3);
genericAssign((void)users_oOczRkVOc3qtKT8rsAJzaw, (void)TM_R8RUzYq41iOx0I9bZH5Nyrw_4, (&NTI_m9aGbgPB3gZgFcKcDkjg9a8g_));
}
N_LIB_PRIVATE N_NIMCALL(void, aDatInit000)(void) {
static TNimNode* TM_R8RUzYq41iOx0I9bZH5Nyrw_2[3];
static TNimNode TM_R8RUzYq41iOx0I9bZH5Nyrw_0[4];
NTI_Qp0mfNOzxWdmSSWLHA9cnZQ_.size = sizeof(tyObject_User_Qp0mfNOzxWdmSSWLHA9cnZQ);
NTI_Qp0mfNOzxWdmSSWLHA9cnZQ_.kind = 18;
NTI_Qp0mfNOzxWdmSSWLHA9cnZQ_.base = 0;
NTI_Qp0mfNOzxWdmSSWLHA9cnZQ_.flags = 2;
TM_R8RUzYq41iOx0I9bZH5Nyrw_2[0] = &TM_R8RUzYq41iOx0I9bZH5Nyrw_0[1];
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[1].kind = 1;
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[1].offset = offsetof(tyObject_User_Qp0mfNOzxWdmSSWLHA9cnZQ, name);
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[1].typ = (&NTI_77mFvmsOLKik79ci2hXkHEg_);
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[1].name = "name";
TM_R8RUzYq41iOx0I9bZH5Nyrw_2[1] = &TM_R8RUzYq41iOx0I9bZH5Nyrw_0[2];
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[2].kind = 1;
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[2].offset = offsetof(tyObject_User_Qp0mfNOzxWdmSSWLHA9cnZQ, last_name);
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[2].typ = (&NTI_77mFvmsOLKik79ci2hXkHEg_);
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[2].name = "last_name";
TM_R8RUzYq41iOx0I9bZH5Nyrw_2[2] = &TM_R8RUzYq41iOx0I9bZH5Nyrw_0[3];
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[3].kind = 1;
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[3].offset = offsetof(tyObject_User_Qp0mfNOzxWdmSSWLHA9cnZQ, age);
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[3].typ = (&NTI_rR5Bzr1D5krxoo1NcNyeMA_);
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[3].name = "age";
TM_R8RUzYq41iOx0I9bZH5Nyrw_0[0].len = 3; TM_R8RUzYq41iOx0I9bZH5Nyrw_0[0].kind = 2; TM_R8RUzYq41iOx0I9bZH5Nyrw_0[0].sons = &TM_R8RUzYq41iOx0I9bZH5Nyrw_2[0]
;
NTI_Qp0mfNOzxWdmSSWLHA9cnZQ_.node = &TM_R8RUzYq41iOx0I9bZH5Nyrw_0[0];
NTI_m9aGbgPB3gZgFcKcDkjg9a8g_.size = sizeof(tyArray_m9aGbgPB3gZgFcKcDkjg9a8g);
NTI_m9aGbgPB3gZgFcKcDkjg9a8g_.kind = 16;
NTI_m9aGbgPB3gZgFcKcDkjg9a8g_.base = (&NTI_Qp0mfNOzxWdmSSWLHA9cnZQ_);
NTI_m9aGbgPB3gZgFcKcDkjg9a8g_.flags = 2;
}
Con Trying to pickup disillusioned Python users
Language geared towards picking up Python users who finally came to their senses, who would probably be better off with other alternatives and more popular C-like languages. Nim claims a lot, but isn't very good at anything in particular, and won't help with job opportunities. Debatably, language is no more than a personal toy for those that unfortunately became addicted to Python-like syntax.
Recommendations
Comments
Flagged Pros + Cons
Con It looks like Python
which actually makes it look like one of the worst 'languages' ever, if you can even call it that. It just trains very bad programming habits.
Pro Really cross-platform
The same code can be used for web, server, desktop and mobile.