|
-
Jan 24th, 2002, 12:33 AM
#1
Thread Starter
transcendental analytic
BORK syntax
The BORK functor (function object) is essential to BORK and will replace the need of classes, functions, template classes, template functions, and will also function as a range of other concept that you don't find in OOP and even in classic Generic Programming. Anyways, here's some basic comparation of syntax between C++ and BORK on OOP concepts.
PHP Code:
Classes, functions
[C++ Syntax]
class vector{
int x;
int y;
int z;
}
class stuff{
static int x;
static const int y;
}
const int stuff::y=5;
[BORK Syntax]
vector{x y z} //alternatively vector* x+y+z
stuff{x y*5} //alternatively stuff* x *y*5
***********************************************
Entry point
[C++ Syntax]
void main(void){}
[BORK Syntax]
main{}
***********************************************
Object Orientation
[C++ Syntax]
class A{
int x;
A(int px){
x=px;
}
int function(int a,int b){
return a+b*x;
}
}
main{
A a(1);
cout<<a.function(2,3);
}
[BORK Syntax]
A{
x=,
,
functor{
,/pa+,/pb*./x
}
}
main{
a{1 A}
cout*a*functor{2*pa+3*pb}
}
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|