<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
> What is the FFI lingua franca again? C or C++?<br><br> <br> C is fairly lingua franca, but how do I *efficiently* *portably*<br> implement exception handling? NT, Tru64, VMS all extend C slightly<br> to allow it. I don't believe C on any other system does.<br><br><br> C also doesn't offer "good idioms" for operator overloading.<br> Easy enough for a target language, but as we are discussing here,<br> not for a source language.<br> <br> <br> <br> + for String really is ok.<br> <br> Java, C++, C#.<br> I realize it has completely different meaning than for integers,<br> but even float vs. int are quite different in what + means.<br> You know, big + small float == big.<br> <br> <br> At this point, probably millions of programmers are comfortable<br> with + being concat. At least in statically typed systems,<br> where 3 and "3" are clearly different.<br> <br> <br> > Any token that consists of purely "special symbols" is an operator that<br> > can be used directly as an operator<br> <br> This changes the meaning of existing code in both C/C++ and Modula-3.<br> <br> e.g.:<br> a:=+b;<br> a:=-b;<br> a:=--b;<br> a:=---b;<br><br> <br> Maybe this can be resolved though.<br> Still, I think there is plenty value in overloading existing operators.<br> As well, one might just go ahead and define new rules for "unused" characters,<br> if we have any. e.g. tilde, percent?<br><br><br> > What people pine for vs. what people need or at least can truly use are<br> > such radically disjoint sets that I often use what people pine for as a<br> > hint for what to avoid.<br><br><br>True.<br><br><br> > How would you enforce a rule that says "<<" means that you are somehow<br> > shifting something to the left<br><br><br>My proposal was, like, that + is always T +(T,T).<br>Similar for *, -, DIV.<br>For << I think it'd always be T <<(T, integer).<br>:= would also be, like, := (T designator?, T)<br><br><br>Granted, the semantic could still be arbitrary.<br>But you wouldn't be able to define the family:<br> <<(stream, integer)<br> <<(stream, text)<br> <<(stream, float)<br><br><br>so that'd probably stop you from <<(stream, integer) meaning<br>to print an integer.<br><br><br>This limited form of operator overloading supports many scenarios.<br>It does not however support the Blitz++ construct that optimizes<br>all temporaries out of matrix/vector math.<br><br><br> - Jay<br><br> </body>
</html>