POV-Ray : Newsgroups : povray.off-topic : GIMP hotkeys/ scripts/ user-defined functions? : Named arguments Server Time
6 Sep 2024 23:23:16 EDT (-0400)
  Named arguments  
From: Invisible
Date: 10 Dec 2008 11:40:58
Message: <493ff11a$1@news.povray.org>
nemesis wrote:

> Hmm, actually, Common Lisp has named arguments... but I'm more of a 
> Scheme guy... :P

How about this:

   data Settings = Settings
     {
       time_step :: Time,
       min_subdivide :: Time,
       tolerance :: Space,
       recursive :: Bool
     }

   foo $ Settings {recursive = True, tolerance = 0.01, min_subdivide = 
0.001, time_step = 2.5}

Heh, that's the trouble with named arguments - it gets so verbose. ;-)


Post a reply to this message

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