|
 |
"ingo" <nomail@nomail> wrote:
> "Mr" <m******r******at_hotmail_dot_fr> wrote:
> >I'm not referring to type here which is another issue, just the
> > "declare" or "var" keyword... I don't see why it's important.
>
> A "big" difference is that in POV-Ray you have to tell a variable whether it is
> local or not. In many languages this is different. Every variable declared
> inside a block is local and it can't escape that block.
>
> So in Nim:
>
> var chicken = 1
>
> for i in 0 ..< 10:
> let n = i + i
> chicken += n
>
> echo chicken
> echo n # fails compilation, Error: undeclared identifier: 'n'
>
> it fails not because it is let (immutable), but because it's local.
>
> There is quite a body of research on what a good beginners language should look
> like. Python scores very high on these. One aspect in several of these
> researches made me chuckle, as I had the same problem decades ago. It is hard to
> grasp 'while' and 'for' loops (Warp wrote a tutorial on it). Using the keyword
> 'every 'makes it more understandable for novices. Another hard one is OOP except
> for the composition of records/objects.
>
> The main problem in POV-Ray is that there are two aspects to it, the 'scripting'
> part and the 'objects' part and that is actually well done. Compare it with the
> javascript 3D stuff, or Vapory https://github.com/Zulko/vapory . If one would
> repurpose an existing language for POV-Ray SDL then look for a language with
> extensive macro abilities to build a DSL so one can have a distinct render
> object sections an distinct script/code sections, similar to POV-Ray now.
>
> ingo
I don't know enough to have an opinion about using a database oriented POV
workflow, which does sound very powerful, but I did have a look at the overview
descriptions of the nim language, and though there are some aspects that I don't
naturally enjoy in its syntax, they probably are specifically the ones that
every one around here seem to be asking for, also the fact that it can be
interpreted and compiled... Well, wouldn't this make it suited to be a scene
description language that could get accelerated as a compiled version just
before parsing?
Post a reply to this message
|
 |