New Language

pohanl at my-deja.com pohanl at my-deja.com
Fri May 12 10:41:51 EDT 2000


Ok, here are some ideas for the new language...


The evolution of languages started first with load/store primative
operations for the CPU.  This led to assembly which was basically a
labeling system for the actual numbers the cpu understands.  When you
have labels, people created an abstract macro layer above that so that
it produced multiple assembly labels to be compiled into machine code.
This is basically what Basic and Fortran, and Colbol did.  But as the
languages became longer and longer, people started inventing ways to
package some of the often used routines, and created the concept of a
method (java), function (c), procedure (pascal), subroutine (basic and
perl).  They are basically a way store often used instructions for the
cpu into nice place (label it), and call it anytime you want.  But
since these functions usually need information passed into it to work,
pass by reference and pass by value became the norm, and was
incorporated into the language.  Usually
when a function is called, the calling function stores the passed
values on a stack (a separate place in memory).  The called function
then take these values from the stack and diddles with them.  When it
is done, it return usually one value (either a reference or value) by
placing it back on the stack, and the caller then takes it off of the
stack.  To make it consistent, and less error prone, some languages
invented the concept of a prototype, which basically says, this
function can only take in 4 passed parameters of type integer, and
return type char, etc etc.  Up to this point you have C and pascal.

Then someone comes along and says, hey, why not package multiple
functions
and data into a structure.  And that is how classes got started (which
lead to object oriented languages like C++ and java).  Now when you are
calling a function, instead of eat food, you say "tom, eat food" you
have to tell which structure/class to do it.  Of course tom would have
to know how to eat and what food to eat.  That is why Tom needs
a function inside called eat, and you need to pass him food as a
parameter.

Well this is fine, but each time you turn on the computer, the classes
dissapear (well at least the data stored inside of them).  So people
invented
components that sort of made classes a little smarter.  Components are
basically classes that (usually, not all) contains serialization, and
function query.  Serialization means it can be stored to harddrive and
back and keep its data intact.  function query (my own term) means you
can
ask a component what functions/methods it supports.  Some people group
the functions into ports and some group them into interfaces.  These
are basically another layer above the functions that you use to
actually execute a function inside a component.  COM, Corba, and
JavaBeans are like these.  (I did some things on Ports, like smart
ports, which automatically does introspection(check parameter types) and
automatically
link methods between components if they match).  I actually created a
new component architecture before (well contributed to it), but it
wasn't truly a new language (you still had to program in java to create
the component pieces to play with).

Well, Perl is something new to me.  It has some old vestiges of
assembly type language structures.  For example, a called function
manually pops stuff off of the stack (well indirectly), as opposed to
being defined in variables identified in the function definition.
It can also return multiple values (interesting).

Well, if you look at most cells in your body, you notice that they have
a cell wall, and inside contains the DNA and other goodies. Things are
passed to the cell through the cell wall.  This is very similar to
passing variables to a component through an
interface/function.

This new language would have components with no constraints on values
passed to it.
as for the values, instead of being dedicated to a method in a
component/class/function, it would be placed on a bloodstream/"bus".
cells/components would grab it when they have appropriate functions
that can use it.

and of course there is the concept of dynamic operators.  operators are
basically built-up from other components.




Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list