POV-Ray : Newsgroups : povray.off-topic : Very long post : Re: Very long post Server Time
6 Sep 2024 23:22:07 EDT (-0400)
  Re: Very long post  
From: Invisible
Date: 23 Sep 2008 11:37:24
Message: <48d90d34@news.povray.org>
Just for giggles, I started trying to implement this in Java. But I 
quickly ended up with 13 classes, almost all of which are about 5 lines 
long.

Parsers are an abstract class. Each primitive parser is a concrete 
subclass. Each parser combinator is a subclass. The parser result is an 
abstract class. Each possible parser result structure is a concrete 
subclass. Parser functions are an interface... My, my, what a lot of 
classes we have there! o_O

It would almost be easier on C++, because then all these tiny classes 
could all be in the same source file. (Plus C++ has the "friend" 
feature, which is eminently useful here.) OTOH, I have no idea how to do 
memory management yet, so that's basically the end of that...


Post a reply to this message

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