c******n 发帖数: 4965 | 1 【 以下文字转载自 SanFrancisco 讨论区 】
发信人: creation (努力自由泳50m/45sec !), 信区: SanFrancisco
标 题: 有人玩macro language 么?
发信站: BBS 未名空间站 (Fri Sep 18 02:26:09 2009, 美东)
m4, 这两天在弄着玩, 套用在java 上很方便啊 | m******t 发帖数: 2416 | 2 Like free marker or velocity?
I didn't know you could easily integrate m4 with java.
That would be interesting to know. Are you talking
about the m4 in unix?
【在 c******n 的大作中提到】 : 【 以下文字转载自 SanFrancisco 讨论区 】 : 发信人: creation (努力自由泳50m/45sec !), 信区: SanFrancisco : 标 题: 有人玩macro language 么? : 发信站: BBS 未名空间站 (Fri Sep 18 02:26:09 2009, 美东) : m4, 这两天在弄着玩, 套用在java 上很方便啊
| c******n 发帖数: 4965 | 3 yes, in unix of course.
one example: to measure time taken by one snippet,
normally I do
start_time = System.nanoTime();
//code snippet
end_time = Sys....
time+= end - start
now I do
__TIME_THIS( (
// code snippet
))
a lot of things like that can be simplified
【在 m******t 的大作中提到】 : Like free marker or velocity? : I didn't know you could easily integrate m4 with java. : That would be interesting to know. Are you talking : about the m4 in unix?
| m******t 发帖数: 2416 | 4 Oh, I see, to use it as a preprocessor.
Interesting idea. I guess some people
might not like it because it could make
compilation errors harder to troubleshoot.
【在 c******n 的大作中提到】 : yes, in unix of course. : one example: to measure time taken by one snippet, : normally I do : start_time = System.nanoTime(); : //code snippet : end_time = Sys.... : time+= end - start : now I do : __TIME_THIS( ( : // code snippet
|
|