<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'> > I would have though your input was most appropriate since your a <BR> <BR>
I thought I was mostly just pissing people off.<BR><BR>> > make assignment an expression<BR>> <BR>> no, that changes the abstract syntax, which is something we're trying <BR>> to avoid.<BR><BR>
Well.. are there no transforms allowed? Or, no growth of the abstract syntax and Modula-3 doesn't necessarily generate every node type, nor maybe does Modula-C generate every node type, but union them?<BR>
For example version 1 of Modula-C probably doesn't have "objects", and maybe always unsafe, no optional safety?<BR>
Though, granted, enabling you to state everything in Modula-C that you can state in Modula-3 is probably important.<BR>
You don't want people chosing one or the other based on needing certain features, only based on taste.<BR>
<BR>
(Someone else said "Codula-3". :))<BR>
<BR>
I guess maybe a more important useful angle here is the interop with C headers.<BR>
<BR>
VAR parameters..are roughly just pointers, ok.<BR>
Or like C++ references.<BR>
<BR>
btw, while we are on the subject..I like C's looping constructs, the three expression for loop, do, while, break, continue.<BR>
Is "exit" what I use in Modula-3 for break? I've been writing loops that could terminate once they find something but have to look this up, otherwise have been letting the loop run longer than necessary..which I saw existing code do anyway.<BR>
<BR>
- Jay<BR><BR>
<HR id=stopSpelling>
<BR>
> CC: wagner@elegosoft.com; m3devel@elegosoft.com<BR>> From: darko@darko.org<BR>> To: jayk123@hotmail.com<BR>> Subject: Re: [M3devel] C-like syntax for Modula-3 [was Re: "target specific pragmas"?]<BR>> Date: Tue, 19 Feb 2008 21:04:09 +1100<BR>> <BR>> I agree that there should be a pre-processor between M3 syntax and C <BR>> syntax, but this should also be integrated into the build system so <BR>> that it is transparent. I think the '.mc' extension is already taken <BR>> though, which is a bummer.<BR>> <BR>> I think we should also be aiming to use this tool to automatically <BR>> convert C header files (with limitations) to M3.<BR>> <BR>> The more I think about it the more I wonder if C programers will <BR>> swallow it: for example VAR params?<BR>> <BR>> Further comments are embedded...<BR>> <BR>> On 18/02/2008, at 3:26 PM, Jay wrote:<BR>> > I've been trying to stay out of this...<BR>> <BR>> I would have though your input was most appropriate since your a <BR>> member of the target audience.<BR>> <BR>> > If a comment at the top of the file can make the Modula-3 syntax <BR>> > more like C then..<BR>> <BR>> Not really what we're aiming for. We're looking for a separate C like <BR>> syntax in separate files.<BR>> <BR>> > replace = with ==<BR>> <BR>> yes<BR>> <BR>> > replace := with =<BR>> <BR>> yes<BR>> <BR>> > make assignment an expression<BR>> <BR>> no, that changes the abstract syntax, which is something we're trying <BR>> to avoid.<BR>> <BR>> > lowercase the keywords<BR>> <BR>> yes<BR>> <BR>> > try to make braces work (with some alteration for C)<BR>> <BR>> yes<BR>> <BR>> > use type name instead of name : type<BR>> <BR>> yes<BR>> <BR>> > separate function parameters with commas and require each to state <BR>> > its type<BR>> <BR>> yes<BR>> <BR>> > for that matter, subset C and require all declarations be separate <BR>> > like that?<BR>> <BR>> Do you think C programmers would object?<BR>> <BR>> > put back ++, --, -=, +=, etc.<BR>> <BR>> yes<BR>> <BR>> > superset C and let . be used in place of -><BR>> <BR>> yes<BR>> <BR>> > new coding style is four space indent with opening braces on their <BR>> > own line :)<BR>> <BR>> I don't do that even in C<BR>> <BR>> > Hm. I think if anyone really wants to do this, instead of nit <BR>> > picking about Modula-3 syntax here and there, go about it in a <BR>> > slightly different way?<BR>> <BR>> We're really not looking to change M3 in any way, just provide an <BR>> alternate syntax.<BR>> <BR>> <BR>> > Pick apart what defines Modula-3 through much discussion.<BR>> > Optional safety -- probably but that for these purposes<BR>> > optional garbage collection -- maybe that too<BR>> > "object orientation" that is a subset of C++<BR>> > try to use C++ syntax?<BR>> > generics (generic modules)<BR>> > independently and relatively easily parsable interface definitions <BR>> > (!)<BR>> > these are both important, but I think "independent" is more <BR>> > important<BR>> > and "relatively easily" could be omitted for the goals of this <BR>> > exercise<BR>> > compiles to native code<BR>> > sizeof(integer) == sizeof(address) (minor detail)<BR>> > built in sets and good enumerations<BR>> > arrays; I don't like them starting at non-zero, but enums for their <BR>> > index are interesting<BR>> ><BR>> > Take the existing definition of C and alter it to have these <BR>> > characteristics very very much like Modula-3 but with very very very <BR>> > much Modula-3 syntax<BR>> <BR>> <BR>> <BR>> <BR>> <BR>> <BR><BR><br /><hr />Shed those extra pounds with MSN and The Biggest Loser! <a href='http://biggestloser.msn.com/' target='_new'>Learn more.</a></body>
</html>