Advertisement

Scripting Language Genesis

Started by November 01, 2004 07:28 AM
116 comments, last by cmp 20 years, 2 months ago
Quote:
Original post by cmp
damm i really should get a new keyboard, i had written a reply and then the z key got stuck an messed everthing up, so have to write everthing again.

When computers turn bad! My cousin watched as her whole essay was deleted - her delete key got stuck.
Quote:
the compiler knows with new remote type(), that type may be remote, so it creates a proxy object.

Ah, another keyword :P.
Quote:
as thought about i really liked the idea of methods beeing objects with a () operator - at least i would explain it this way from my c++ background.
but when you write goblin.init(), it looks to me like goblin is a global var, wich should really be avoided in oop languages, you could of course say that every superclass is contained in the base class (i think you call it object), but this would mean that the baseclass is changed everytime you add a new class to your project, something wich does not look right to me - and you can't implement the baseclass in your own language.
additional you are blurring the lines between object-instances and classes: when you write integer a = integer.init() integer is a class and an instance - or init is static, but then you can't say integer.async().init() because what should async() return? it can't return classes it would have to be an instance, this way integer is an instance of class and a class itself at the same time, wich looks like a design error to me.

Okay, here goes.
There is a global object for every class. This has the same name as the class. You ask it to create new instances of the class. But this object can also have methods and properties of it's own. When you say "integer i" you are creating a variable (container) to store an instance of type integer. When you say "integer.alloc()" you are asking the global integer object to create a class for you. The "init()" method after is calling on the new instance, and it returns itself. When you are declaring a class "-" means that the method / property is for the instance "+" means it is for the super. If you declared a class like this:
class turkey    - turkey init()        return self        - void gobble()        + turkey alloc() // implemented in object (nasty C++ code)        + string color()        return "Brown"

This code would work:
turkey t = turkey.alloc().init()t.gobble()cout.print(turkey.color())

This code wouldn't
turkey t = turkey.alloc().init()turkey.gobble()cout.print(t.color())

They both function as different objects, yet they are linked. This is how object oriented is done in Objective-C.

Yes I agree that this is bluring the line between class and object, I just have to get my words right. A class is both these objects, an object's parent is the class it inherited from. An object's owner (I used to call it super) is the static object that always exists. An object is an instance of the class (not the owner). The problem (as you pointed out) is that both the class and the super have the same name. I'm not sure how to fix this. Maybe this:
turkey t = owner(turkey).alloc().init()

But really I don't have a problem with it, just it means that it is hard to explain to others, and the terminology gets mixed up.

I really like the static owner object idea, it means that common design patterns can be created easily, and that you have control over the creation of your objects. If you don't want any objects of a certain type to be made, just override the alloc method and return null. This would be the same as just having one static class that is semi (packages) global.

Also this works well when creating objects differently.
Quote:
Quote:
Yeah, I want a type of generic (template) support, but I'm not sure if it should be in the language or not. The only thing I think it is really useful is data structures, and if I can supply the structures (lists etc) then there won't be a need for templates. There will be support for them in the vm so I can always add support later.

but sometime the user will implement structures himself and now he either has to rewrite it everytime or use boxig - i think this is the term microsoft used for object o = (object)integer_var.

What structures will they implement that can't be done with objects and lists? I was thinking about adding a map template as well.
Quote:
the only problem is that you have to supply some boostraping code, since it is like the chicken and the egg. i use xslt as a boostraping language, since it is fairly easy to write and very flexible when transforming xml code.

I was wondering about that...
Quote:
from what i have got you should never write sth. like tag : /* nothing */, because the parser then get stuck, because he can't distinguish between tag other_tag and nothing.

and from what i remeber you should rahter use left recursion with yacc, so you should write: tag: tag other_tag | other_tag.

Ouch!

This grammer which has only 1 shift / reduce conflict (the traditional if conflict) written by the man himself uses the same method as I do (which is left recursion). In this zip file the readme contains the same method to do an optional tag. These are just two of the sources I found offhand.

Left recursion is doing it this way
tag:    other_tag    | tag other_tag;

Compared to right recursion which is
tag:    other_tag    | other_tag tag;

That is the difference.

If you pretend to be the parser, you will see that it doesn't need to keep anything on stack, every point along the parsing of multiple other_tags the whole thing is already matched by one of the options, it just adds other_tags onto the end.

It doesn't matter what order you state the or's (I think) I've always just done it in order of complexity - which has worked so far.

Have you used bison and generated the .output file? If not you may find that you have a lot of conflicts. It took a while to make it work, but now I have no conflicts.
Quote:
i had done the same, but since i'm now writing everything in xml, there is no problem with oeprator precedence.

How is there no problem? You still need to work out which one comes first if you want to allow an expression like a + b * c.
Quote:
i think i will still use lex for parser generation but everything beyond this will be implemented in my language. so generated the tree is done with lex and the transformation of the tree to the xml file is done in my language.

Lex doesn't generate a tree, it generates tokens. Do you mean lex and yacc / bison working together?
Quote:
Quote:
i = [3,3][0,2,3:1,2,3:2,2,3]

btw. this is the same way my calculator does define multi-dim-arrays ;)
but it has the problem that you are restricted to 2 dimension with this syntax.
and with [[1,2,3][1,2,3][1,2,3]] is the problem that you won't have a multidemensional array, but an array of arrays.

Yep, no support for multidimensional arrays. What are you doing with them in a scripting language anyway? :P

[Edited by - umbrae on November 6, 2004 12:29:55 PM]
Quote:
Original post by Nice Coder
Firstly:
The forevers are like variables, they are removed as they go out of scope (as would variables).

A method is a scope, an object is a scope.

A little different to how I was thinking about variables. Every variable in my language is a pointer. There is no such thing as a variable like in C++ that gets deleted when it leaves scope. The only thing that gets deleted is the space for the local pointers.

To quote my own post:
Quote:
An object is created with a reference count of 1. The object that created it 'references' it. Another object can get the object and say that it also references it by
object.retain()
. When an object is finished with another object it releases it
object.release()
. This way, if you temporally want an object but don't want to keep it then you don't retain it.

Objects returned from methods are "autoreleased" which means if an object is returned like this:
return object.autorelease()
At the end of the method it is returning to, the object will be checked if it was retained during that method, if it wasn't then it is deleted.

It is also possible to just autorelease an object during the method, at the end it will be deleted if nothing has retained it.


The problem would be that the trigger would have to be enforced to autorelease. Also what is to stop you assigning it to one of your properties?

Quote:
What you would have, is a list of currently active forevers. You remove forevers as they leave scops, and add them to the list as you see them. (or they go into scope).

I would say the destinction between forevers and triggers are:
Triggers are triggerred from outside (the game, the user(s), whatever). Forevers are triggered from inside (variables changed, function called, something happening or not happening, timer expiring)...

I don't think my language needs forevers (It's a scriping language for games) but it is a cool idea, and steps away from the 'sequential' programming languages that are normally.

Someone could say that it would create more spagetti code, and it would be hard to figure out what is happening (debugging etc.) but I think these are small things.

Quote:
Also, for the includes, your including functions from other objects. Thats like going (inside your object)

#include <stdio>
...
Just with functions, like
#include Getch()
Ect.

Maybe something like header files?
In the header of the main source file, it would have things like commonly used function lists, and an alias. use that alias in the includes, and all the functions get included.

I think I get it now. The included methods and variables are the ones you are allowed to access in other objects? Wait, I don't think that way what you were meaning - nevermind.

I think that still goes against object orientation. Just subclass the class you want the functionality of.
Quote:
Whens are not like triggers...
I origionally thought of them like shortaned ifs as one expression...
How about these things being Micro-triggers, or micro-forevers?
They execute once, then die.

How about some includes?
*** Source Snippet Removed ***

I really don't like includes. Their use in C++ is mostly because the stupid compiler only does one pass, it needs to know about the other objects before it can talk about them.

Another option that I would be more okay with would be multiple inheritance. If each of the files you included was a class - and you just said that you sub-class each of them, you wouldn't have to actually physically grab the files. Once you have parsed all the files, you can just look and grab the methods and variables from those classes you sub-classed.

Quote:
Heres an idea, the full stops in the declerations are like ;'s in c++. You can put whatever whitespace you want inside them (comments too), and then, on the . you recognise an end-of-statement.

I actually quite like the tab block idea, no need for a end-of-statement identifier at all.
Quote:
...
So it takes the value of d, when it is triggered. Makes sence? (note to self: Do not code while tired. Also do not post while tired)

Makes sense.
Quote:
Also, if d went out of scope, the trigger could be deleated. (unless it was d = null, special case).

For overridden methods, maybe an override flag?

Great, another keyword. :P.

For my language the norm is to be able to override all methods (except private ones). Just create a new method of the same name in a subclass using the same parameters (or overload it with different parameters).

I hope I'm using the right terminology:
Override - a subclass implements a method that has the same name as one in it's parent class 'overriding' the other method.
Overload - a method is called the same name as another one, but it takes different parameters.
Quote:
Thought:
In main.cpp you have your:
Header
and
object declarations.

You now have your source code in other files, which are seperate and can be reused.

In the other files, you can have other object declerations. these are assumed to have been derived from its parent object (which specified it). they can also specify other parent objects.

Isn't that how you can do it in C++ anyway? (Maybe you really do need to sleep :P). I plan for voodoo to not have to #include anything, as long as the classes that you are talking about have been parsed, you can compile the class.

Actually in voodoo the class contents can be anywhere. At any point you can 'drop' down to a class and add another method - in any file. This may be less secure, but I don't like being restricted to declaring a class in one file. If a bunch of classes have similar methods wouldn't it make sense to group these together in one file?
Quote:
I was referring to voodoo, but all of the languages mentioned are coming along great.

:P Thanks, and all of them do look cool.

[Edited by - umbrae on November 6, 2004 10:35:20 AM]
Advertisement
you won't have operator precedenc problems because the expression a + b * c would be translated to <add><local select="a"/><mul><local select="b"/><local select="c"/></mul></add>
if (a + b * c) = (a + (b * c))
<add>    <local select="a"/>    <mul>        <local select="b"/>        <local select="c"/>    </mul></add>



then wouldn't (a * b + c) = (a * (b + c))
<mult>    <local select="a"/>    <add>        <local select="b"/>        <local select="c"/>    </add></mult>


if using the same order? And we know that multiplication should be done before addition, so that is wrong. What I am asking is how does the parser know what order to do the operations given an expression with no brackets?

[Edited by - umbrae on November 6, 2004 3:09:10 PM]
yay, Code ordering!

From codestream (my compiler):
[obr][a][add][mult][c][cbr]

Now, the mult gets hit with a regex rule, turning it into
[obr][a][add][obr][mult][c][cbr][cbr]

or (a + (B * C))

Order of ops, using regexes... Nice eh?

And that string becomes:
Ld ax, 00Ld bx, 01Ld cx, 02Mult bx, cxAdd ax, dxSto 003, dxsub dx, dx

Very simple sample program...

Little thing you might want to now: Variables in C++ do not get deleated when they leave scope. They jus tloose the pointers to them, causing a memory leak. [grin]

This brings up a little poroblem,
if i went something like
x = new i[15]
i then let x go out of scope, and acess it... Null pointer, or even worse, dual pointers (two pointers in different spots, opinting to the same thing. Happens all the time, when memory is allocated and de-allocated. the downside with your approach is that all memory is acessable from Everywherere once its created.)


I didn't think my language neede dforevers either (its a scripting language for ai), and now, in all the serious projects hat i've done with it... lets say i have a bit more then a couple hundred of them.

It sortof makes speghettii code, but the way i usually use it, is something like a continuous assert. i also use them for internal triggers (oh! the characters walking right! Do this NOW!. or Oh NOOO! He's walked over the edge of the screen, put him back on before anyone notices!)

There also srprisingly easy to debug (maybe thats begause they show up on the debug logs? X is now = 25, Forever #221 executed, X = 0)

Forevers are like variables, but are different.
They have a scope of operation, but cannot be assgned or changed.

Also, Scopes should be used. Its just common sence.

[grin]

How about this:

Overriddden method:

Class Cl1:         Derives from Obj2         Overridden functions, Func1         Overload function: Func2(int i, decimal d) = func2(int 1)Override Fucntion1()'Do stuffend functionoverload func2(int 1)'do stuffend function

??

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
ok, if you would use the same order the expression would end up in the wron way, but currently i'm writing in xml so this won't happen. when i use a parser i will of course use operator precedence:
the expression a + b * c would then turned into the following tree:
mul b c
add / - a

wich then would be turned into the xml tree:
<mul> b c
<add>/- a


Quote:
When computers turn bad! My cousin watched as her whole essay was deleted - her delete key got stuck.

but she did have a backup, hadn't she? - as i type into my wordprocessor (currently SciTE) i use ctrl-s every minute or so, it just go a habit for me, because i'm using the console and make to compile my projects and there is no autosave in the editor.

Quote:
What structures will they implement that can't be done with objects and lists? I was thinking about adding a map template as well.

for example a hashed list / map, even if you rely on your map container to implement them you always have to do sth like this on lookup:
map_of_int32_and_a_class["hallo welt".hash()]
but withe a hashed map written with templates you could directly write:
map_of_string_and_a_class["hallo welt"] wich seems much mor clearer to me.
another interesing thing about templates is that my kernel library is completly written in my language (except tuples). even Kernel.Array is written in it, in fact it relies on inline cpp, but this is code is just limited to a new, a delete and a lookup wrapper.

currently it looks like this:
<?xml version="1.0"?><module name="array" type="library"><inline type="h"><![CDATA[#include <assert>template<class T>inline T __array_at(Kernel::Pointer<T>& p, uint i){	return (p.__p());};template<class T>inline void __array_set(Kernel::Pointer<T>& p, uint i,  T& e){	p.__p() = e;};template<class T>inline void __array_alloc(Kernel::Pointer<T>& p, uint c){	p = new T[c];};template<class T>inline void __array_free(Kernel::Pointer<T>& p){	delete[] p.__p();};]]></inline><namespace name="Kernel">	<!--	an attempt to implement the kernel.any class in ecp	-->	<class name="Array">		<parent>			<type><access select="Collection"><scope select="Kernel"/></access>				<tparameter type="T"/>			</type>		</parent>				<tparameter name="T" />				<attribute name="m_pointer">			<type select="Pointer">				<tparameter type="T"/>			</type>		</attribute>				<attribute name="m_min" type="Integer"/>		<attribute name="m_max" type="Integer"/>				<!-- isn't supported at this moment	-->		<infix operator="@" type="T">			<parameter name="index" type="Integer"/>			<body>				<return>				<call select="item">					<parameter><local select="index"/></parameter>				</call>				</return>			</body>		</infix>				<method name="item" type="T">			<parameter name="index" type="Integer"/>			<body>				<call select="assert">					<parameter>						<call select="valid_index">						<parameter><local select="index"/></parameter>						</call>					</parameter>				</call>								<return>				</return>			</body>		</method>				<method name="valid_index" type="Boolean">			<parameter name="index" type="Integer"/>			<body>				<return>					<land>					<ge><local select="index"/><local select="m_min"/></ge>					<lt><local select="index"/><local select="m_max"/></lt>					</land>				</return>			</body>		</method>				<destruct>			<body>				<call select="__array_free">					<parameter><local select="m_pointer"/></parameter>				</call>			</body>		</destruct>				<method name="upper" type="Integer">			<body>				<return><local select="m_max"/></return>			</body>		</method>				<method name="lower" type="Integer">			<body>				<return><local select="m_min"/></return>			</body>		</method>				<method name="count" type="Integer">			<body>				<return><sub><local select="m_max"/><local select="m_max"/></sub></return>			</body>		</method>				<method name="is_empty" type="Boolean">			<body>				<return><eq><call select="count"/><integer value="0"/></eq></return>			</body>		</method>			</class></namespace></module>


@right/left recursion, etc. - i have to admit that i'm a real yacc/bison noob ;) - i just write on parser with it and this was directly the one for my language.

Quote:
Yep, no support for multidimensional arrays. What are you doing with them in a scripting language anyway? :P

lol, i was thinking the same in my opinion you don't even need them in a 'real' language, as you could just use an array of arrays for initizalization.

btw: i think i will supply assert directly as a part of the langauge so you could rewrite
<call select="assert">					<parameter>						<call select="valid_index">						<parameter><local select="index"/></parameter>						</call>					</parameter>				</call>

as
<assert><call select="valid_index"><parameter><local select="index"/></parameter></call></assert>


[Edited by - cmp on November 7, 2004 8:38:19 AM]
Advertisement
Quote:
cmp
but currently i'm writing in xml so this won't happen


Sorry, I failed to realise that you were in fact talking about parsing your xml file, not an actual expression. Of course there is no problem with operator ordering if you are writing it in xml.

Quote:
but she did have a backup, hadn't she?


I didn't get to hear the rest of the story, I don't think she was incredibly computer literate so she may have had no backup and not realised that undo would have undone the changes.

Quote:
for example a hashed list / map...


If you want to use the map, the key needs to be a string for the time being. Are you asking if it would be possible to have the key as any class that can be hashed? Wouldn't that just mean that there is an interface called hashable, and the key that is accepted is of this type. Polymorphism!

The point that I want to make is that templates and sub-classing are both similar. If you have an object container (object o = ...) in your class you can now store every type of object in the language. The difference that templates provide is that the variable is actually of the type you specify (if you returned the object it would actually return as the object's type - not as object). In java if you create a list and fill it with one type of class, then ask for the nth element - it would be returned as an object (you need to cast) even though you knew from the start that you only ever wanted to store integers (for example). If java used templates as their lists (1.5?) then they would be able to return the correct type - no casting required.

Templates provide strong compiler type-checking.

These are all good reasons to have templates, but I want my language to be simple. Yes I will have the major collections as templates (lists, maps) but they will be transparent to the user. This is one of the features that is used less (at least in true oop languages - C++ not invited) and although I could put it in at a later date - can be left out with minimal affect on the power of the language.

Quote:
@right/left recursion, etc. - i have to admit that i'm a real yacc/bison noob ;) - i just write on parser with it and this was directly the one for my language.


I'm sure that the only difference between a n00b and everyone else is that the n00b admits that they don't know everything, the other people still don't know everything but they just don't say so.

I did quite a bit of reading and experimenting with bison and flex and parsing sometime during July this year. I'm in the same situation having written one parser - for my language only. I still think I'm a n00b and I think that it the best place to be with everything - acknowledging the fact that there are still things you don't know, being humble.

Quote:
lol, i was thinking the same in my opinion you don't even need them in a 'real' language, as you could just use an array of arrays for initizalization.


I can see how they are useful in powerful languages that have to deal with bitmaps and graphics. My idea was that these are encapsulated by C++ code, but my language can reason about them. In this language you should be able to ask a 3d object to read itself in from a file, and render itself to the screen - without touching any polygons. The C++ implementation deals with the actual details.

Quote:
btw: i think i will supply assert directly as a part of the langauge so you could rewrite


I have mixed opinions about assertions. They are a good debuging technique, but only catch errors that have already happened. More of an 'extended' debug technique. I use the "printf( "Here\n" )" all the time when debugging.

Maybe an extended assert that can be turned on or of and they can be logged. It would be good to see when each of your assertions was checked and what the values were when the assertion happened.

Assertions are good when things are going wrong, but when everything is right they aren't needed.

Quote:
Nice Coder
Order of ops, using regexes... Nice eh?


Don't let it go to your head :P, but that is awesome. A really cool way of dealing with precedence.

What regex library (if it is a library) do you use? Was it good?

Quote:
Little thing you might want to now: Variables in C++ do not get deleated when they leave scope. They jus tloose the pointers to them, causing a memory leak.

char* c = strdup("Hello");integer i = 5;

I know that when the method leaves scope c becomes a memory leak, but I thought that i gets deleted.

Also I thought that this was the same with respect to classes that you have written.
voodoo_engine e;voodoo_engine f = new voodoo_engine();

I thought that e was automatically deleted for you in C++?

Quote:
This brings up a little poroblem,
if i went something like
x = new i[15]
i then let x go out of scope, and acess it... Null pointer, or even worse, dual pointers (two pointers in different spots, opinting to the same thing. Happens all the time, when memory is allocated and de-allocated. the downside with your approach is that all memory is acessable from Everywherere once its created.)


Not sure what you are getting at here. If you do:
int i = 5;int* j = &i

And return j, and the method goes out of scope, you could be in a lot of pain. Is this sort of what you meant?

Quote:
I didn't think my language neede dforevers either (its a scripting language for ai), and now, in all the serious projects hat i've done with it... lets say i have a bit more then a couple hundred of them.

It sortof makes speghettii code, but the way i usually use it, is something like a continuous assert. i also use them for internal triggers (oh! the characters walking right! Do this NOW!. or Oh NOOO! He's walked over the edge of the screen, put him back on before anyone notices!)


Sounds like a bit of a hack job to me.

Quote:
Also, Scopes should be used. Its just common sence.


Dude, sense is spelled sense - not sence. *shudder*

Scopes can have two different uses. They are for the compiler, so that it knows what variable you are talking about, and so the compiler knows when to delete the memory for the variables that have been declared (for loops etc).

I am not against the use of scopes, in the normal way (the local variable of the same name as a property is the one you are talking about, local variables in for loops, class variables, etc). I just think that having the ability to change scope to another object means that what you are doing probably isn't oop, and that to keep it oop it would be better to not be able to do this.

I think that too much freedom is bad, progamming needs structure.

Quote:
How about this:

Overriddden method:
...


I think that you don't need to explicitly state that you are overriding or overloading a method. Although the errors could be bad (not realising that you are overriding a method - disastrous) I don't think it would happen very often.

Wouldn't this be nicer?
class base    - void function1()        // do stuffclass refinement : base    - void function1() // overridden        // do different stuff        - void function2(integer i)        // do stuff        - void function2(integer i, decimal d) // overloaded        // do stuff

Classes can call the implementation of it's parent using the parent.method() notation. This will explicitly use the parent's version of the method.
class base    - void function1()        // do somethingclass refinement : base    - void function1() // overridden        if boolean            // do something else        else            parent.function1()


[Edited by - umbrae on November 7, 2004 2:42:58 PM]
In the first part: Please do not nit-pick about spelling and grammer. I'm just not particularly good at it.

It doesn't get deleated... sorry (stack, its pointer gets popped out of existance). It doesn't get de-allocated by the garbage collector. So you end up with a memory leak.

Forevers are not a hack job!

What if you wanted to call a function to continually moniter the keyboard & mouse, or network?

You would go:

Forever Updatenetwork
Forever Updatekeyboard
Forever updatemouse

Now, the functions wouldn't be updated forever, that would be impossible. but from the functions point of view, it gets called forever.

You would probably look inside the function, find the things its finding from outsied it. when once of the variables change, you recall the function.

Of cource, if you can't do that, then you'd have to raise an exeption... "Forever
needing forever to execute!"

I feel that freedom is good for programmers, you should be able to do what you want to accomplish your goals.

++Loggable_asserts.goodness

Undefined constant line #22A "Changing scoope to another object", are you referring to calling another object?

Nice idea for overriden functions! (overloaded functions would be easy to pick up, theyed have different numbers, and types of arguments!)

To be honest:
I don't particularly like the -'s i nthe methods...

Maybe something like

class class1       Method_1      Method stuff      end method_1end class1


?

As another thought:
For each variable, we have a onread and onwrite function. which is called when the variable is read from, or written to.

?

Oh, yes: i used the standered vb regex library (easiest way to achieve the goal of making a nice compiler...)
From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
for anyone interested i created a little project page (but i ain't have enough time to finish it) at berlios.de
yacll.berlios.de

would be nice if you would look for typos and if some can figure out why the examples does not work (the grey boxes in the root section)

edit: i've allready spotted some typos, but i'm to tired to clean them up.

[Edited by - cmp on November 8, 2004 2:55:00 PM]
Quote:
Original post by Nice Coder
In the first part: Please do not nit-pick about spelling and grammer. I'm just not particularly good at it.

I wasn't nit-picking, you have plenty of other errors - just that one struck a particular nerve.

Quote:
It doesn't get deleated... sorry (stack, its pointer gets popped out of existance). It doesn't get de-allocated by the garbage collector. So you end up with a memory leak.

Will have to do a short example in C++ to see if you are right.

Quote:
Forevers are not a hack job!

Maybe. From what you said it sounds like a bit of a hack job - "He's walked over the edge of the screen, put him back on before anyone notices!". It sounds like your program is 'patched' together with code like this - which seems like a temporary stand-in for the real thing. You've found a problem and patched it with code that makes things right by continuously checking.

Quote:
What if you wanted to call a function to continually moniter the keyboard & mouse, or network?

You would go:

Forever Updatenetwork
Forever Updatekeyboard
Forever updatemouse

Normally these things are implemented using an event system. This is good because on the computer these are normally generated by interrupts anyway - polling is bad.

Quote:
I feel that freedom is good for programmers, you should be able to do what you want to accomplish your goals.

Do you like the private / public / protected keywords in C++, and do you use them?

Quote:
++Loggable_asserts.goodness

I think so.

Quote:
Undefined constant line #22A "Changing scoope to another object", are you referring to calling another object?

Huh? I guess you are talking about my comment regarding changing scope. You said in an earlier post that it would be a good idea to be able to change namespaces at runtime. What exactly did you mean by this? I thought you mean that you could (in a method) say something like "using another_object" and from then you could refer to that object's properties just by their names, not having to use dot notation.

Quote:
Nice idea for overriden functions! (overloaded functions would be easy to pick up, theyed have different numbers, and types of arguments!)

To be honest:
I don't particularly like the -'s i nthe methods...

Maybe something like

class class1       Method_1      Method stuff      end method_1end class1

The "-" is to specify that it is an object method as opposed to a super method (which is "+"). I like the "-" and "+" because it is simple and acts as a sort of bullet point, like you are listing the contents of a class.

Quote:
As another thought:
For each variable, we have a onread and onwrite function. which is called when the variable is read from, or written to.

I like that idea, and I was thinking about it before. How would the syntax work?

This topic is closed to new replies.

Advertisement