1. Re: Euphoria++

Mike the Spike, in his inimitable and occasionally offensive way, makes a
quite valid point with regards to using compiler- and/or platform-specific
code in the translator output.

What I might suggest - which would ultimately enhance cross-platform/
cross-compiler support - is for the Euphoria translator to generate code
for specific, well-documented routines to perform given functions, such as
graphics or interrupts, and also provide 'wrappers' to provide the
'standardized interface' for supported platforms/compilers.  As people
attempt to use new platforms/compilers, if calls to the specified routines
are made, it would be the user's responsibility to provide the appropriate
functionality, conforming to the specified interface.

Thus, the Euphoria translator would always generate code for placing a
pixel on the screen using a routine "putpixel(int xcoord, int ycoord, int
color)"; this would be mapped by wrapper routines - provided either as a
precompiled library/object file or as a source include file - to whatever
the "real" routine for the particular platform/compiler is.  Depending on
the code actually in the putpixel routine that the translated code calls,
this could even allow for 'text-mode graphics', based on line-drawing
characters, for example in the DOS CP437 character set, or the old
Commodore PET/64 character graphics.

Thoughts?  Arguments in favor?  Arguments against?  (Flames to /dev/null,
please)
--
Jeff Zeitlin
jzeitlin at cyburban.com
(ILink: news without the abuse. Ask via email.)

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu