Re: UML Code Generator for Pascal



At 08.03.2009 17:37, Johann Glaser wrote:
Hi!

There are a few downsides of using this approach:
 - The order of the exported classes and the fields and methods within a
   class is random, so you have to sort everything by hand.
Reminnds me on http://bugzilla.gnome.org/show_bug.cgi?id=519162

I solved these order problems by replacing the attributes dictionary by
a map.

This issues was already solved in SVN, which makes your patch conflict with the current trunk version.

That todo list is just too long to convince me to commit your patch right away. At least some things should be very low hanging fruits.

The Pascal exporter is already way more elaborate than all other
exporters. So there is no reason to refuse the Pascal exporter, just
because the other exporters have no written TODO list.

Bold statement. Note that the above issue was already fixed in SVN and it was the main reason making me hesitate.

But a todo-list for how the newly written code should have been written differently still does not make too much sense to me.

> All the remaining TODOs strongly depend on a fundamental refactoring of
> the internal representation of the data. Currently a class ("Klass") and
> lots of lists of lists of lists are used, so you always have to remember
> list indexes to access e.g. an attribute's name, comment,
Isn't there the concept of named constants in Pascal? In Python and virtually any other language I know there is ;-)

... This is
bad programming style and tedious to work with. Since my Python
knowledge is still virtually zero, I'm not going to play with this any
further.

Cool, insulting and ignorance almost in the same sentence.

Please find attached a patch for my current version of the Pascal code
generator.

Commited:

2009-03-08  Hans Breuer  <hans breuer org>

        * plug-ins/python/codegen.py : PascalRenderer by Johann Glaser and
        some adjustments to (Cxx/Py/Java)Renderer to almost get on par

Thanks,
        Hans
        
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]