POV-Ray : Newsgroups : povray.binaries.programming : An updated povr tarball for Unix/Linux. f6b1c13e : Re: An updated povr tarball for Unix/Linux. f6b1c13e Server Time
20 Oct 2021 19:57:18 EDT (-0400)
  Re: An updated povr tarball for Unix/Linux. f6b1c13e  
From: Le Forgeron
Date: 23 Aug 2020 13:10:37
Message: <5f42a30d$1@news.povray.org>
Le 19/08/2020 à 21:27, jr a écrit :
> hi,
> Le_Forgeron <jgr### [at] freefr> wrote:
>> Le 04/08/2020 à 10:26, Le_Forgeron a écrit :
>>> Ok, I note there is one remaining point that could be interesting:
>>> getting the current number of parsed tokens.
>>> Does not seem so urgent as a change.
>> For the curious, the value is in parser/parser.h : mTokenCount
>> Now, can someone provide a good name for the SDL to return that value ?
> some new function modelled on 'sysconf(3)' would be cool, with 'mTokenCount'
> just one of the argument values, perhaps.

You know what is bad with such idea ?
1. Look at the map type in image_map: using number instead of explicit
good name is painful, even when Constants.inc provides some name afterward.


2. sysconf is a pain to use: you always need to be on the local system
to be sure to get what you ask (the man page of sysconf is using
symbolic constants, which do not translate at all between systems once
compiled). Initially I thought you wanted access to sysconf, but it
seems to only be a model.

3. it is too open: there is no usable specification.
It is like "add a foo(bar) function which return mTokenCount when bar is 3"
Why having such function ? What would be the common part with the value
returned when bar is 5 ?
Also Povray loves floating point values, and hates integer, so what is
the meaning of foo(3.4) ?
It reminds me far too much of the poke & peek tables in the 80's computers.

To misname things is to add to the unhappiness of the world.

Post a reply to this message

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