program = block block = lines lines = line | lines line line = line_content EOF | line_content END | definition | import import = "import" STRING_LITERAL EOL line_content = expression definition = function_definition | class_definition | c_type_definition | global_definition | c_function_declaration function_definition = "function" identifier arguments EOL block return_value EOL | "function" ident
ES6で導入されたアロー関数式は従来のfunction式の代替構文ではあるものの、純粋な糖衣構文ではありません。 特にthisの扱いが異なることは有名です。 具体的にどう違うのかと言うと、アロー関数のthisは宣言時のスコープにおけるthis固定である一方、function式におけるthisは呼ばれ方によって決まります。 加えてアロー関数のthisはapplyやcallで上書きすることは出来ませんし、bindで新しい関数を作っても上書きされません。 「アロー関数はthisを束縛しない」 この特徴に対し、「アロー関数はthisを束縛しない」という説明がよくされています。 が、この文言よく意味が分かりません。 字面やthisの動きだけ見ると、アロー関数の方がthisの値が変わらないわけでより値を束縛してそうに見えます。 出所と原文 おそらく、この文言の出所はMDNかと思われます。 アロー関数式
Some years ago someone asked whether it would make sense to switch Python to a PEG parser. (Or a PEG grammar; I don’t recall exactly what was said by whom, or when.) I looked into it a bit and wasn’t sure what to think, so I dropped the subject. Recently I’ve learned more about PEG (Parsing Expression Grammars), and I now think it’s an interesting alternative to the home-grown parser generator tha
As of December 2018 PHP 5 and 7.0 became End of Life. It is now July 2019 and up to 74% of PHP powered sites in the top 1 million are running software that is End of Life. This means there is no support and more importantly if new vulnerabilities are discovered, there will be no security fixes released. Upgrades do take work and major updates can take even more work. People are busy and the reluct
LISP in Two Days with Rust 10 Jul 2019 As a sidetrack from the development of my programming language I’ve spent some time developing a LISP. The plan is to use the language as a testing ground for experimentation with transforming an AST in Rust. The syntax of LISP is simple and was developed to be easy to parse. I figured it would make a good starting point for an experimental compiler. The lang
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く