POV-Ray : Newsgroups : povray.pov4.discussion.general : Random POV-Ray 4 SDL proposal, #1 : Re: Random POV-Ray 4 SDL proposal, #1 Server Time
23 Apr 2024 21:04:24 EDT (-0400)
  Re: Random POV-Ray 4 SDL proposal, #1  
From: clipka
Date: 14 Jul 2021 18:56:40
Message: <60ef6ba8$1@news.povray.org>
Am 14.07.2021 um 11:35 schrieb jr:
> hi,
> 
> clipka <ano### [at] anonymousorg> wrote:
>> ...
>> No worse than the current SDL, and better structured - that's all I'm
>> asking of a new SDL. Ideally with consistent syntax between scene
>> descriptions and functions, and maybe with a rigorous enough structure
>> to allow for a compiling rather than interpreting parser.
> 
> have you looked at Tcl/Tk yet, for inspiration?  has many (imo) natty features,
> nice, clean syntax, and byte-compiles.

Unless those features have a direct impact on the core principles of the 
language's syntax, I don't care much for them at this point. Also, I 
think it would be more productive to name those features that you like 
about it, rather than just (to put it into more blunt of a picture than 
adequate here) point in the general direction of the language and say, 
"I like some of the stuff that's in there, see if you can spot it".

As for nice, clean syntax - I would disagree.

At a very first glance, Tcl/Tk sounds like a promising basis: Its main 
purpose (nowadays) is also to describe hierarchical structures (albeit 
not geometric objects and surface properties, but rather GUI elements), 
with programmatic elements mixed in for good measure. Unfortunately, the 
Tk part (which is the description of GUI elements) was bolted on later, 
and in my opinion it shows. At its very core, Tcl is a command 
shell-style scripting language.

One of the results is that different Tcl statements may have their own 
individual quirky "micro-syntax". Just like all of POV-Ray's individual 
geometric primitive, pattern and what-have-you statements all have their 
own little "micro-syntax" quirks. Any commonalities between them are 
just superficial conventions. Which bothers me to no end.


In my opinion, the best approach to judge a language for suitability as 
the basis for a new SDL is to ask (and answer) the following three 
questions:

- "What is the 'grammar' of this language, i.e. the core principles that 
govern its syntax?"

And based on that:

- "How would a simple scene be described in this language?"
(A chrome sphere on a colorful checkered plane, with camera and all, and 
maybe a text object to showcase strings, should do as a first example.)

- "How would programmatic elements mesh with this syntax?"
(A simple example with a loop and a few conditionals should be a 
reasonable starting point.)


When I do that for Tcl/Tk, I find that the results look - in my mind - 
ugly AF.


Post a reply to this message

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