POV-Ray : Newsgroups : povray.pov4.discussion.general : Identifier declaration consistent with other languages Server Time
22 Nov 2024 07:06:29 EST (-0500)
  Identifier declaration consistent with other languages (Message 9 to 18 of 18)  
<<< Previous 8 Messages Goto Initial 10 Messages
From: Kenneth
Subject: Re: Identifier declaration consistent with other languages
Date: 11 Nov 2008 18:00:01
Message: <web.491a0e1e909e697878dcad930@news.povray.org>
"Chambers" <ben### [at] pacificwebguycom> wrote:
> I am categorically against whitespace having meaning.
>

I tend to agree. It would, to my mind, create another level of difficulty in
trying to track down erroneous bits if code. Not being a programmer per se
(except with the POV SDL), I'm thinking that both the space bar and the tab
button would create identical(?) white spaces. Of course, that may be my naive
and uninformed notion. Please correct me if I'm wrong; I'm willing to learn!

Ken W.


Post a reply to this message

From: Allen
Subject: Re: Identifier declaration consistent with other languages
Date: 13 Nov 2008 07:35:01
Message: <web.491c1e38909e69788f162dfb0@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> "Chambers" <ben### [at] pacificwebguycom> wrote:
> > I am categorically against whitespace having meaning.
> >
>
> I tend to agree. It would, to my mind, create another level of difficulty in
> trying to track down erroneous bits if code. Not being a programmer per se
> (except with the POV SDL), I'm thinking that both the space bar and the tab
> button would create identical(?) white spaces. Of course, that may be my naive
> and uninformed notion. Please correct me if I'm wrong; I'm willing to learn!
>
> Ken W.

I'm pretty certain that Python considers a tab character in the input to be
equal to 8 space characters.  It is really my only complaint with Python, in
all other ways I really enjoy Python.

With such code it is better not to mix tabs/spaces else visually you can't
really see where a block is at.  Nice thing about C/C++, braces can be anywhere
and statements are terminated with a semicolon so it can span multiple lines
anywhere.  Python can only span multiple lines with a line continuation or
inside of groups such as [], (), and {}


Invalid python:

list =
[
  1,
  2,
  3
]

Valid:

list = [
  1,
  2,
  3
]


Post a reply to this message

From: Dan Connelly
Subject: Re: Identifier declaration consistent with other languages
Date: 13 Nov 2008 08:39:10
Message: <491c2dfe@news.povray.org>
Chambers wrote:
> I am categorically against whitespace having meaning.


If you want python-like syntax, just embed POV in python.  Or if you want Perl-like
syntax, embed in Perl.  Personally, I think python is more manageable, although I'm
far more adept at perl.

If an independent syntax is to be maintained, it's best kept simple at the expense of
power.

Dan


Post a reply to this message

From: Dan Connelly
Subject: Re: Identifier declaration consistent with other languages
Date: 13 Nov 2008 08:40:17
Message: <491c2e41$1@news.povray.org>
Dan Connelly wrote:
> Chambers wrote:
>> I am categorically against whitespace having meaning.
> 
> 
> If you want python-like syntax, just embed POV in python.

I had that backwards.... it's "embed python in POV":
http://www.linuxjournal.com/article/8497


Post a reply to this message

From: SharkD
Subject: Re: Identifier declaration consistent with other languages
Date: 13 Nov 2008 09:45:00
Message: <web.491c3ce0909e697887ff2bed0@news.povray.org>
Dan Connelly <djc### [at] yahoocom> wrote:
> Chambers wrote:
> > I am categorically against whitespace having meaning.
>
>
> If you want python-like syntax, just embed POV in python.  Or if you want Perl-like
syntax, embed in Perl.  Personall
y, I think python is more manageable, although I'm far more adept at perl.
>
> If an independent syntax is to be maintained, it's best kept simple at the expense
of power.
>
> Dan

Lua is another option. I like it better than Perl or Python.

-Mike


Post a reply to this message

From: Warp
Subject: Re: Identifier declaration consistent with other languages
Date: 13 Nov 2008 10:20:55
Message: <491c45d7@news.povray.org>
SharkD <nomail@nomail> wrote:
> Lua is another option. I like it better than Perl or Python.

  AngelScript is more tempting than lua, python or perl because it has much
closer resemblance to the language POV-Ray itself is written in. It should
also be as easy to embed as lua.

-- 
                                                          - Warp


Post a reply to this message

From: SharkD
Subject: Re: Identifier declaration consistent with other languages
Date: 13 Nov 2008 20:35:00
Message: <web.491cd4ff909e6978849303c80@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>   AngelScript is more tempting than lua, python or perl because it has much
> closer resemblance to the language POV-Ray itself is written in. It should
> also be as easy to embed as lua.
>
> --
>                                                           - Warp

Never heard of AngelScript. :)

-Mike


Post a reply to this message

From: Warp
Subject: Re: Identifier declaration consistent with other languages
Date: 14 Nov 2008 11:10:07
Message: <491da2df@news.povray.org>
SharkD <nomail@nomail> wrote:
> Warp <war### [at] tagpovrayorg> wrote:
> >   AngelScript is more tempting than lua, python or perl because it has much
> > closer resemblance to the language POV-Ray itself is written in. It should
> > also be as easy to embed as lua.

> Never heard of AngelScript. :)

  Google is your friend.

-- 
                                                          - Warp


Post a reply to this message

From: SharkD
Subject: Re: Identifier declaration consistent with other languages
Date: 20 Nov 2008 00:05:00
Message: <web.4924ef8c909e6978ae013790@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> SharkD <nomail@nomail> wrote:
> > Warp <war### [at] tagpovrayorg> wrote:
> > >   AngelScript is more tempting than lua, python or perl because it has much
> > > closer resemblance to the language POV-Ray itself is written in. It should
> > > also be as easy to embed as lua.
>
> > Never heard of AngelScript. :)
>
>   Google is your friend.
>
> --
>                                                           - Warp

What's important, IMO, is that scene files be easy to parse using an external
editor. XML is a popular choice, and many parsers already exist; however, my
personal preference would be the use of simple and compact hash arrays.

-Mike


Post a reply to this message

From: Warp
Subject: Re: Identifier declaration consistent with other languages
Date: 20 Nov 2008 07:10:24
Message: <492553b0@news.povray.org>
SharkD <nomail@nomail> wrote:
> XML is a popular choice

  A popular choice for what? Certainly not for an embedded scripting language.
(XML is *not* a scripting language at all.)

-- 
                                                          - Warp


Post a reply to this message

<<< Previous 8 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.