κeenです。型レベル迷路作ったよ!コンパイルが通ったらゴール!! Rustで型レベルステートマシン定義できるじゃないですか 1。 ということは1マス単位で移動できる方向を使い分けられるし迷路くらい作れるんじゃね?というお話。 サクっといきます。 マス型。 use std::marker::PhantomData; pub struct Cell<Maze, X, Y> { m: PhantomData<Maze>, x: PhantomData<X>, y: PhantomData<Y>, } impl<Maze, X, Y> Cell<Maze, X, Y> { const fn new() -> Self { Self { m: PhantomData, x: PhantomData, y: PhantomData, } } } 迷路間で定義を使い回したいので迷路もパラメータに持って
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ページを開く