2016-04-02
ScalaのREPLでASTを表示する機能
scala | |
showのほうは2.11.0から(?)あって、printは2.11.8から
Neat trick I just discovered: add `// show` in the Scala REPL to see the actual code that gets compiled.
@jaguarul starting 2.11.8, add `// print` and hit tab, it will show the de-sugared version of your code (without the REPL's wrappers)
scala -Xprint:typer などとすれば、コンパイル時に毎回こういうの表示してくれるのは常識ですが(ぇ)、
コメント書くだけで式毎にできるんですねー
コメント
トラックバック - http://d.hatena.ne.jp/xuwei/20160402/1459593280
リンク元
- 9 https://t.co/E9RvOXpYUj
- 2 https://t.co/bbMe2YJ99c
- 2 https://t.co/xmEynBzHFo
- 1 http://b.hatena.ne.jp/entrylist/はてなブログ
- 1 http://b.hatena.ne.jp/entrylist/hatena/はてなブログ
- 1 http://feedly.com/i/latest
- 1 http://htn.to/9QLBd8zAUVj
- 1 http://htn.to/QYK5DN
- 1 http://reader.livedoor.com/reader/
- 1 http://www.google.co.jp/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=0CCEQFjAA&url=http://d.hatena.ne.jp/xuwei/20160402/1459593280&ei=YOX_VqqRB5za_ASnnwE&usg=AFQjCNGRpZGuBM5fEPQS2rFP_Fsmgwr2Fw