IBM Developer is your one-stop location for getting hands-on training and learning in-demand skills on relevant technologies such as generative AI, data science, AI, and open source.
最近やってる事を書きます。しばらく前に、アランさんからメールが来て、ここしばらくイアンの奴に全力投球するようにと言われました。他に Javascript がどうだとか OpenDocument がどうだとか沢山あるけど、色々出来ないのでとりあえず全然分かっていないイアンの奴を勉強するのが先決だと思い、エディタを書くという課題を自らに課しました。ほんとは物理シミュレーションとか、関数型言語を作るとか、そういう派手な奴をやりたかったのですが、イアンの奴がそれどころでは無い完成度なのでそれは諦めました。 なぜエディタかと言うと、良くある GUI フレームワークや、Squeak でさえもテキスト入力の部分はブラックボックスになっていて、ユーザが気軽に触れない事になっているので、前々から良くないと思っていたからです。この点で Swing は結構カスタマイズ出来るようになっていて参考になります。あと、
大人のためのブラックボックス読解講座――クロージャとオブジェクトの微妙な関係(その2):プログラミング言語の進化を追え(1/3 ページ) 前回に引き続き、Scheme言語の処理系、Gaucheを開発している川合史朗氏が、クロージャの機能を検証し、関数型言語とオブジェクト指向言語の関係について解説していきます。今回は、クロージャとオブジェクトのより深淵を探求します。 抽象化ツールとしてのクロージャ C++的なオブジェクトの世界では、オブジェクトの実体とは「ひとかたまりの構造体としてメモリ上に置かれたインスタンス変数の値」にすぎません。オブジェクトのポインタを取れば、それは事実上、その構造体へのポインタを持っていることになります。クロージャを「関数」中心で見ていると、その実体は「オブジェクト」の実体とは異質なもののように思えるでしょう。 確かにクロージャのナイーブな「実装」は、関数ポインタと環
第0回 あらためてRuby入門 まつもとゆきひろ氏自身による「Ruby入門」をお届けします。日経Linuxの連載開始前の特別企画(2005年4月号)として,Rubyが他のスクリプト言語やオブジェクト指向言語とどこが違うのか,なぜ便利なのかを中心に解説してもらったものです。 ● 基本と他言語との違い ● 実装とRuby誕生の秘密 第1回 プログラミングとオブジェクト指向の関係 プログラマを目指す人々の中にも,「オブジェクト指向は難しい」とか,「なかなか分からない」という印象を持つ方が多いようです。そこで,Rubyを題材にオブジェクト指向という考え方について説明していきます。 ● その1 ● その2 ● その3 第2回 抽象データと継承 オブジェクト指向プログラミングを構成する3原則のうち,前回は「ポリモーフィズム」を学びました。今回はオブジェクト指向の歴史を復習した後,残りの「データ抽象」と
翻訳 原文:Higher Order Programming In Javascript著者:Sjoerd Visscherライセンス:クリエイティブ・コモンズ・ライセンス(帰属) 前提知識JavaScriptを使ったオブジェクト指向プログラミングの知識が必要となります。以下のWebreferenceの記事を読み、よく理解しておいてください。OOP in Javascript, part IOOP in Javascript, part IIDouglas Crockford最終更新2004/3/28はじめに高階プログラミングでは、値として関数を使うことができます。つまり引数として関数を別の関数へ渡すことも、関数を別の関数の返り値にすることもできるのです。この形式のプログラミングは、しばしば関数型プログラミングで使用されますが、「通常」のオブジェクト指向のプログラミングでも非常に有用です。
このごろの言語はオブジェクト指向でなければ 言語として認めてもらえないような気配もあったりするので、 crowbarにもオブジェクトを組み込むことにします。 が、crowbarのオブジェクト指向は、 C++やJavaのそれとはちょっとばかり趣が違います。 なにしろクラスがありません。 では具体的にどんな仕様と実装になっているのか、今回はそれを説明します。 GLOBALをかましたソースは こちらから参照可能です。 ダウンロードは、UNIX版がこちら、 Windows版がこちら。 細かい不具合修正を全バージョンに対して行うのは大変ですので、 ver.0.3系列はver.0.3.01に統合しました。 ここから参照してください。 crowbarでは、配列の生成はネイティブ関数new_array()を使いますが、 同様に、オブジェクトはネイティブ関数new_object()を使用します。 o = n
紹介 - Introduction どうやって Tiny CLOS を使うか - How to Use Tiny CLOS CLOS vs. 他のOOPのアプローチ - CLOS vs. other approaches to OOP CLOS のクラスとオブジェクト - Classes and Objects in CLOSインスタンスの生成 - Creating instances クラスの作成 - Creating classesインスタンス変数 - Instance Variables 総称関数とメソッド - Generic functions and methods総称関数の作成 - Creating generic functions メソッドの作成と追加 - Creating and attaching methods 総称の初期化 - The initialize gene
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く