News for hackers. Stuff that matters.
Re:Nim 1.2 by andybak on Friday April 03, 2020 @01:18PM (#22771711)
How would the dynamism and expressivity of something like Django port to Nim? I love the whole declarative paradigm of the Django forms and models API. Is Nim good at this kind of DSL-ish plasticity?
Re:Nim 1.2 by PMunch on Friday April 03, 2020 @01:27PM (#22771837)
Extremely well I'd say. Nim has a very powerful macro system, and DSLs are very common across various modules. Haven't used Django myself, but something like Jester (https://github.com/dom96/jester) or Karax (https://github.com/pragmagic/karax) is a good place to start if you want to do web development in Nim.
Re:Nim 1.2 by alehander42 on Friday April 03, 2020 @01:24PM (#22771795)
i'd say so: i think many rails/django concepts are translate-able to metaprogramming in nim, not always with the same idioms, but usually there is a way to do it, and you can typecheck some things
Re:Nim 1.2 by treeform on Friday April 03, 2020 @02:40PM (#22772670)
I feel DSL-ish ways of Nim are so much more advanced then python.

I have written UI DSLs in Nim, as well as SQL DSLs. Only LISPy languages come close to the level of DSL you can do.

Re:Nim 1.2 by TylerE on Friday April 03, 2020 @03:41PM (#22773246)
Poorly. Nim is not an object-oriented language.

You could certainly write an expressive web framework in nim, but a django/rails sort of paradigm is not the way.