I would like to share my idea regarding meta-programming c# with lisp
Example:
Namespace Fun {
class Customer {
SqlConnection con;
Customer() {
(set con (open-connection :server "local" :username
"prabu" :password "prabu" :database "db"))
}
(defun ReadCustomer ()
(select con :table-name "Customer" :fields "CustNo,
Name, Gender, Address"))
(defun DeleteCustomer ()
(delete con :table-name "Customer" :pk "CustNo"))
}
}
/* this sould give some-thing like this after pre-processing with the
meta-compiler.
Namespace Fun {
class Customer {
Customer() {
con = new SqlConnection();
con.ConnectionString = "server=local;
username=prabu; password=prabu; database=db");
}
public DataTable ReadCustomer {
SqlDataAdapter da = new SqlDataAdapter();
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select CustNo, Name, Gender,
Address from
Customer";
cmd.Connection = con;
da.SelectCommand = cmd;
DataTable dt = new DataTable();
da.fill(dt);
return dt;
}
public void DeleteCustomer(int custNo) {
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "delete from Customer where
CustNo=" + custNo;
cmd.ExecuteNonQuery();
}
}
}
waiting for ur suggessions, ideas, any other references like the same,
and possitive or negative comments,
- prabu
Le Thu, 17 Aug 2006 05:03:24 -0700, prabuinet a écrit :
> waiting for ur suggessions, ideas, any other references like the same,
> and possitive or negative comments,
Maybe cl-emb would be what you need. It is targetted at HTML but I
suspect it could be used anywhere.
Doubtfully,
Nowhere man
--
···········@levallois.eu.org
OpenPGP 0xD9D50D8A