Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Don't know Nim.
But some people love variables of variables... Maybe even further nested.
It's when stuff like stropping and/or escaping becomes important.
Whenever I see people utilizing stuff like that, PTSD kicks in and I prepare myself for a painful event.
Variables of variables with object's / lists / .... as an example -
C0D4681464ysure it can make sense, there's to many generic keywords at times for some languages where you want to use them.
In this example - what in the flying fuck are they thinking! -
@C0D4
"Don't understand why do. Just need finish example or more alpo for dinner." -
How have you found Nim otherwise so far? I’ve shortlisted it for digging into when I find time for it, and I’d like to hear your impressions of it so far.
-
C# does that with a @ I think
I would never use it myself, I think the main purpose is for code generator to be able to work with whatever names they come up with -
@SortOfTested oh, wait, i read the wiki entry and now i get it.
that's pretty stupid. millions of words to choose from but no, i have to have one of those about 20 which i can't have. -
@100110111 I initially read about it when getting acquainted with Clojure's macro system. Someone on Hacker News (I think) had mentioned that the capability that Nim has for macro development and thus the inception of dsls was amazing, the fact that it created one executable model much like Go does for different systems was something that attracted me as well. The syntax is fairly descriptive, I generally prefer static typing since it does make my life easier for larger projects, not that I build lots of them, but I still like it. Type inference on Nim is superior to Go. It has amazing support for functional programming (always a big plus for me) as well as good async practices. You can select your compiler and GC model (yes it is a GC language) when generating C code, which is pretty good, but just like anything else never the same as actually writing C code.
My biggest complain? syntactic whitespace. I really don't like it AND you don't get to use tabs....only spaces. -
@AleCx04 ”you don’t get to use tabs” is really the main takeaway here. It would have to be a bloody exquisite lang to make up for that - at least for someone who hates using space much as I do. Is it still worth it?
-
@100110111 in my honest opinion: yes.
There are a couple of things to learn from the language, it is very good if you ask me, and if you use an editor in which you have the support for it then the identation takes place for you, if you prefer tabs then you can just adjust the spacing for it and it barely makes it a disturbance.
I am planning some mad shit for custom C based libraries interfacing with Pharo Smalltalk once I get to better grips with Nim, because I can't for the life of me sit down to learn all the nuances of C in order to make something remotely useful, I can't stand the syntax of Rust (for now) and C++ would be just as much of a big issue, so at least for me Nim happens to be a gift from the coding gods.
I do recommend it bro :D would love to know what you think about it if you jump into it. -
@AleCx04 so Nim stays up there in my shortlist of interesting languages to burrow into - alongside Rust and D.
-
@100110111 nim does look very interesting but I really, really dislike indentation based syntax
Or using keywords instead of symbols like "and" instead of &&
Just give me C-style syntax please -
@LotsOfCaffeine that’s your loss really. I get it tho, if intendation based syntax brings to your mind Python. Guess you’ve never tried F# or any other ML family lang?
That said, I really hate syntax that uses the ”end” keyword... -
@100110111 I've seen F# before, but only a bit
python gives me some sort of ptsd, as any python code I've ever looked at was messy.
I always end up questioning, whether the code I look at is still in the same function or whatever
Curly brackets just make things nice and clear -
@LotsOfCaffeine I agree that curly brackets make for clarity.
But speaking of intendation based syntax, there seems to be two outcomes: Python, that looks messy af, and F#, which is real clean and concise. But it’s not only due to having or not having curly brackets, it’s the rest of the syntax, too. At least in F# correct design choices have been made to make it clean and clear. Python’s just a hot mess... -
@100110111 yeah maybe it's just python that left me disliking that type of syntax
Though this makes the ‘tabs vs spaces’ debate 10 times worse.
I gotta try nim at some point though, I've read that it can easily interact with C++ and that garbage collection is completely optional.
Related Rants
-
shozukan42My company just blocked devRant ip... Well, now I need to use my own mobile data to procrastinate
-
PuzzlesDev5Did you know that you could only add 23 smileys to a message in Slack? ๐ค Well now you know! ๐
-
TheSilent3What is that? Ada uses three spaces for indentation? (ใ๊ฆเฒ ็เฒ )ใๅฝกโปโโป
During my readings of Nim I found a technique known as stropping.
This gives devs the ability to use keywords as identifiers.
Example:
var `var` = "fucking why?"
echo(`var`)
Can anyone tell me WHY would someone subject themselves to such confusion notion? Mind you Nim has large features for macro programming and the creation of dsls, i have not gotten far enough to assess this, but what other use could you highly knowledgeable lads and lasses think of?
question
but why?