タグ

2018年3月13日のブックマーク (12件)

  • Auto-Application

    Previously an empty argument list () was implicitly inserted when calling a nullary method without arguments. E.g. def next(): T = ... next // is expanded to next() In Dotty, this idiom is an error. next ^ missing arguments for method next In Dotty, the application syntax has to follow exactly the parameter syntax. Excluded from this rule are methods that are defined in Java or that override metho

    todesking
    todesking 2018/03/13
  • Automatic Eta Expansion

    Previously, a method reference m was converted to a function value only if the expected type was a function type. If that was not the case, one had to write m _ to force the conversion (which is called eta-expansion). For methods with one or more parameters, this restriction has now been dropped. Example: def m(x: Boolean, y: String)(z: Int): List[Int] val f1 = m val f2 = m(true, "abc") This creat

    todesking
    todesking 2018/03/13
  • Option-less pattern matching

    Dotty implementation of pattern matching was greatly simplified compared to scalac. From a user perspective, this means that Dotty generated patterns are a lot easier to debug, as variables all show up in debug modes and positions are correctly preserved. Dotty supports a superset of scalac's extractors. Boolean Pattern Extractor defines def unapply(x: T): Boolean Pattern-matching on exactly 0 pat

    todesking
    todesking 2018/03/13
  • Implicit Conversions

    An implicit conversion, also called view, is a conversion that is applied by the compiler in several situations: When an expression e of type T is encountered, but the compiler needs an expression of type S. When an expression e.m where e has type T but T defines no member m is encountered. In those cases, the compiler looks in the implicit scope for a conversion that can convert an expression of

    todesking
    todesking 2018/03/13
  • Changes in Implicit Resolution

    Implicit resolution uses a new algorithm which caches implicit results more aggressively for performance. There are also some changes that affect implicits on the language level. Types of implicit values and result types of implicit methods must be explicitly declared. Excepted are only values in local blocks where the type may still be inferred: class C { val ctx: Context = ... // ok /*!*/ implic

    todesking
    todesking 2018/03/13
  • Implicit By-Name Parameters

    Call-by-name implicit parameters can be used to avoid a divergent implicit expansion. trait Codec[T] { def write(x: T): Unit } implicit def intCodec: Codec[Int] = ??? implicit def optionCodec[T] (implicit ev: => Codec[T]): Codec[Option[T]] = new { def write(xo: Option[T]) = xo match { case Some(x) => ev.write(x) case None => } } val s = implicitly[Codec[Option[Int]]] s.write(Some(33)) s.write(None

    todesking
    todesking 2018/03/13
  • Erased Terms

    Why erased terms? The following examples shows an implementation of a simple state machine which can be in a state On or Off. The machine can change state from Off to On with turnedOn only if it is currently Off. This last constraint is captured with the IsOff[S] implicit evidence which only exists for IsOff[Off]. For example, not allowing calling turnedOn on in an On state as we would require an

    todesking
    todesking 2018/03/13
  • 「冷静に考えて、育児放棄を選んだ」というある女の言い分(石井 光太) @gendai_biz

    ノンフィクション作家の石井光太さんが、「ワケあり」の母親たちを密着取材していく連載。彼女たちが「我が子を育てられない」事情とは? * 石井光太さん記事バックナンバーはこちら http://gendai.ismedia.jp/list/author/kotaishi 子供を育てられない親たちの多くが、自分にその能力がないことから目をそらしている。これまで連載で見てきた、そういう親たちは、大きく2種類に分けることができる。 1、 子供に対して虐待、育児放棄していることを自覚していない。 2、 自覚していても、共依存の関係になったり、自分のアイデンティティーがそこにあったりして関係の悪化を止められない。 これとは逆に、きちんと虐待していることを受け入れ、自分には育児能力がないと考え、その先の道筋まで考えようとする人がいる。 今回は、そういう女性について紹介したい。 「死んで、幸せな家庭を返せ

    「冷静に考えて、育児放棄を選んだ」というある女の言い分(石井 光太) @gendai_biz
    todesking
    todesking 2018/03/13
    いい話だった(本当)
  • 本当にSF史に残すべきゲームは何かということを俺が教えてやる: 不倒城

    目次・記事一覧(1) レトロゲーム(185) 日記(772) 雑文(512) 書籍・漫画関連(56) 子育て・子どもたち観察(115) ゲームブック(12) フォルクローレ・ケーナ・演奏関連(86) FF14(40) レトロでもないゲーム(336) 始めたばっか(13) アナログゲームいろいろ(37) 人狼(48) ネットの話やブログ論(61) 三国志大戦(20) 無謀的世評(52) ゴーストライター(16) 大航海時代ONLINE(40) FF3(6) Civ4(18)

    todesking
    todesking 2018/03/13
  • 文書を書き換えさせられた…「自殺」職員がメモ : 政治 : 読売新聞(YOMIURI ONLINE)

    学校法人「森友学園」との土地取引に関する決裁文書の書き換え問題を巡り、財務省近畿財務局で学園への国有地売却を担当していた部署に所属し、7日に自殺したとみられる50歳代の男性職員が、省の指示で文書を書き換えさせられたとの趣旨のメモを残していたことが、関係者への取材でわかった。 同省によると、書き換えは昨年2月下旬~4月、近畿財務局作成の14の文書で行われた。当時、同省理財局長だった佐川宣寿(のぶひさ)・前国税庁長官の答弁との整合性を取るため、学園との事前の価格交渉をうかがわせる記述などが削除された。理財局の指示で、理財局と近畿財務局の一部職員が行ったという。麻生財務相は、最終責任者は佐川氏だったとしている。

    文書を書き換えさせられた…「自殺」職員がメモ : 政治 : 読売新聞(YOMIURI ONLINE)
    todesking
    todesking 2018/03/13
    ミッ
  • 「百合展」マルイ池袋店での開催中止は「東京五輪に向けた表現規制」? マルイに理由を聞いた - ライブドアニュース

    2018年3月13日 13時3分 リンクをコピーする by ライブドアニュース編集部 ざっくり言うと マルイ池袋店で17日から開催予定だった「百合展」が、急遽中止になった 五輪にむけてマルイが表現規制に踏み切ったのでは、との推測がネットに浮上 広報担当者はこれを否定し、色々な意見を踏まえたまでだと説明した マルイ池袋店で3月17日から開催予定だったが、急遽中止になった。12日に百合展ホームページに掲載された文書によると、展示そのものは会場を変えて開催できるよう調整中で、東京以外の大阪、福岡での開催は、予定通り行うとしている。 百合展は、女性同士の恋愛や友情を意味する「百合」をテーマにした。百合をテーマにした作品を作るイラストレーターや漫画家、写真家などが参加し、「表現方法にとらわれず、百合の魅力を多くの方にお伝えする」ことを目的にしている。2016年から開催されていて、今年で3回目になる。

    「百合展」マルイ池袋店での開催中止は「東京五輪に向けた表現規制」? マルイに理由を聞いた - ライブドアニュース
    todesking
    todesking 2018/03/13
  • すべてを終わらせる2万字 - ひとなぐりこけし

    私の安否情報のスクショが出回っているらしい。ここまで1か月以上かかった。狭苦しい鍵アカウントから、ようやく私の“来の肉体”であるところの @Fukuso_Sutaro に戻ってくることができた。ちょうどこの記事が完成したこの日にだ。なんとタイミングの良いことか! 私がインターネットの海の奥底に息を潜めていたのは、私の身の安全を確保するため、そしてこの記事を完成させるためである。 昨日まで、私は“複素数太郎”であることをやめていた。“複素数太郎”はたしかに死んでいたのだ。ごく一部の安否を隠し通せないであろう人々には「現実世界にやばいやつが干渉してきそうなので、もし死亡説など出ても公然と否定するようなことはしないでください」とお願いした。オープンシェアハウスなどの人が多く集まる場所では毎回このアナウンスをしていた。“お願い”の射程範囲の人々は3桁にものぼった。にもかかわらず、少なくとも現実世

    すべてを終わらせる2万字 - ひとなぐりこけし
    todesking
    todesking 2018/03/13
    インターネットだと思った