Closed fungiboletus closed 5 years ago
Well, in ThingML, we have print
and println
. While console.log
is indeed a good candidate for println
, we had some issues using it for the print
, since it seems console.log
always terminates with a new line... Can you really do a print
?
However, if relying on console.log
makes things easier in your project of re-unifying the different JS compilers, it is probably worth not caring too much about the print
(which anyway, is only supported in NodeJS and not in the browser)
@ffleurey ??
Oh I see. I could make a version which use console.log
as fallback.
That would be perfect :-)
The new implementation has a few more "if" which may have a performance impact for big data CSV transformations using ThingML.
Well, my colleagues have other tools for CSV-driven big data.... So I assume we should be fine :-)
I read the
console.log
NodeJS source code, and I see no good reasons to preferprocess.stdout.write
over a beautifulconsole.log
.The
console.log
is more standard and the change reduces the number of lines of code.