### Introduction

So-o defines a functional layer which adds an object-oriented programming model to a structured programming language. Inspired by Smalltalk, fruits of a long practice of Objective C and different Lisp dialects, So-o is complete, simple and light, easy to understand.

##### Implementation

So-o has 3 functions: `defclass` which defines a new class, `sendmsg` which is systematically used to send a message to a class or an instance, and `supersend` which runs a method inherited from a superclass. Simply object-oriented!

So-o proposes a standard implementation in several languages. The code in PHP is less than a 1000 lines. The code in C in just about 1500 lines. ###### Example
namespace Hello;

require_once 'So-o.php';

defclass('Hello', null, 1, null, null, null, array('hello'));

function i_hello(\$self) {
echo 'Hello from So-o!', PHP_EOL;

return \$self;
}
``````\$ php -a
php > require_once 'Hello.php';
php > \$hello=sendmsg(\$Hello, 'new');
php > sendmsg(\$hello, 'hello');
Hello from So-o!`````` A game of poker • A complete program written in PHP with So-o. ###### Example
#include "So-o.h"

class Hello;

static instance i_hello(instance self) {
printf( "Hello from So-o!\n" );

return self;
}

void defclassHello() {
selector _i_messages[] = {
"hello",    METHOD(i_hello),
0, 0
};

Hello = defclass("Hello", 0, 1, 0, 0, 0, _i_messages);
}

A simple `main` to illustrate how the `Hello` class is used:

#include "So-o.h"

#include <stdlib.h>

extern class Hello;

extern void defclassHello();

int main( int argc, char *argv[] ) {
instance hello;

defclassHello();

hello = (instance)sendmsg(Hello, "new").p;

sendmsg(hello, "hello");

sendmsg(hello, "free");

exit( 0 );
}
``````\$ gcc -O -fstrength-reduce -finline-functions -fomit-frame-pointer -c test-Hello.c
\$ gcc -O -fstrength-reduce -finline-functions -fomit-frame-pointer -c Hello.c
\$ gcc test-Hello.o Hello.o libso-o.a -o test-Hello
\$ test-Hello
Hello from So-o!`````` A game of poker • A complete program written in C with So-o.
{"ft_lang_label":"__label__en","ft_lang_prob":0.649224,"math_prob":0.403072,"size":1881,"snap":"2019-26-2019-30","text_gpt3_token_len":505,"char_repetition_ratio":0.1113479,"word_repetition_ratio":0.087272726,"special_character_ratio":0.27432218,"punctuation_ratio":0.192,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96705157,"pos_list":[0,1,2,3,4,5,6,7,8],"im_url_duplicate_count":[null,1,null,2,null,1,null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-07-22T23:35:25Z\",\"WARC-Record-ID\":\"<urn:uuid:eb2f7cd8-fd49-4af5-b6f2-ec1c2f9ce0a0>\",\"Content-Length\":\"16728\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:72f9bd6b-67f2-4afe-afaa-593882fcd21e>\",\"WARC-Concurrent-To\":\"<urn:uuid:afc2b6e6-c011-4581-be68-587d63bb4948>\",\"WARC-IP-Address\":\"5.135.161.161\",\"WARC-Target-URI\":\"http://www.so-o.org/\",\"WARC-Payload-Digest\":\"sha1:PGGAL6I63FWEN3UYL3D72PGNQRMEZBBG\",\"WARC-Block-Digest\":\"sha1:KXLY5E6YAJZIV2MEVKTTA5TIJBJW6IC4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-30/CC-MAIN-2019-30_segments_1563195528290.72_warc_CC-MAIN-20190722221756-20190723003756-00339.warc.gz\"}"}