The main trait of nessie it borrows from python: indenting. the main difference to python: it is typed, something that python developers are now considering
for python 3.
"ever since i started using python myself i have to agree, indenting is one of the best ideas in the evolution of the syntax of programming languages that has been made in a long time. indenting is a must for readable code anyways and anyone who thinks that indenting is a problem is either writing sloppy code or has simply never tried python" explains Martin Bähr, coder
"i like concise and explicit syntax without redundancy. and that's something that nessie promises to offer. the syntax should serve both the user and the compiler. the compiler should not try to guess what the user wants to do, but
it should also not force the user to be overly verbose."
nessie offers a number of interesting things that python does not (yet) have.
one of them is static typing. this topic has always raised a controversy in the python community. nessie may be the way out for those that do like static typing without forcing their opinion onto the rest of the python community.
On Fri, Apr 01, 2005 at 04:26:59PM +0100, Content-wire Research wrote:
> MARTIN, CAN YOU EXPLAIN WHAT THAT MEANZ FOR OUR GENERAL PUBLIC
> PLEASE EXPLAIN INDENTING AND TYPED
indenting refers to the syntax of the language.
in c, java, pike or other languages you can write:
void main() {
dosomething();
return;
}
or you could write:
void main()
{
dosomething(); // these lines are
return; // indented
}
the latter uses indenting. it is completely optional, but it makes the code easier to read.
in python and nessie you MUST use indenting:
python:
def main():
dosomething()
return
nessie:
void main()
dosomething()
return
typed means a few things:
first a type in programming revers to the type of data:
text can be a different type than numbers, then there are different types of numbers and so on.
this article http://www.ferg.org/projects/python_java_side-by-side.html explaind types in the appendix better than i could. look for:
APPENDIX: About static vs. dynamic typing, and strong vs. weak typing, of programming languages.
while java is statically typed and python is dynamically typed pike and nessie are both statically AND dynamically typed. thus you really have full control over how typing is handled.
if you read the comparison between java and python then note that nessie (and pike) are much more like python than they are like java.
> WHAT KIND OF ENVIRONMENT AND COMPILER CAN NESSIE RUN ON
nessie runs on anything where pike runs, that is almost any unix like linux, solaris or mac os x and windows too.
nessie uses pike as the compiler. and pike is written in c
> AND WHAT KIND OF APPS IS IT GOOD FOR,
it is good for almost anything, from short scripts to large application servers. since nessie is a relative of pike anything written in pike could also be written in nessie. pike and nessie are interchangable, it is basicly a question which syntax you prefer.
in pike web and application servers and a lot of other things have been written:
roxen, caudium, sTeam, and many more. take a lok at pike.ida.liu.se for more information on pike. anything that is true for pike is also applicable to nessie.
you can even mix pike and nessie code in the same application (in separate files)
> AND DO YOU KNOW HOW MANY DEVELOPERS USE IT?
nobody yet, except me.
> HOW DO YOU EXPECT PEOPLE WILL TAKE IT UP?
i have no idea yet. time will tell.
> HOW WILL THAT AFFECT PRODUCTS?
nessie and pike are very readable languages. much easier to learn than eg perl.
(perl may be easy for writing code, but it is a lot harder to read other peoples code)
nessie is hopefully even easier than pike and thus will increase sharing of code. (to reuse someones work being able to read and understant it is very important.
pike and nessie are also very fast.
pike produces machine code at runtime where this is possible, and nessie of course can take advantage of that.
> MARTIN, CAN YOU GIVE US A COUPLE OF LINES OF CODE WRITTEN IN NESS COMPARED
> TO OTHER LANGUAGE?
there are a few more examples in the download package:
http://steam.iaeste.at/nessie/downloads/
i am not very creative in writing sample code, if you have an example in a language you are familiar with then i can produce a comparative nessie example to match yours.
> >there are many more operators THAN WHAT?
than the ones demonstrated: * and /, there is also +, -, % and a few more.
> >one interesting feature here is nessies class syntax. you don't need to mark a class with a keyword, but just but the contents of your class into a file. the filename becomes the class name. instantiate or inherit the file elsewhere and you are done.
> THAT SOUNDS COOL (read: I understand that part)
this is btw also a feature of pike.
> MARTIN WHAT IS YOUR INVOLVEMENT? ARE YOU A DEVELOPER OF NESSIE?
yes, nessie is all my work. however nessie depends on pike, it runs on top of it and i hardly contributed any code to pike (i have made other contributions though and used pike a lot)
99.9% of nessie are actually pike itself, really almost all of the features of nessie are pike features. so my contribution to nessie as a whole is really only the indenting syntax.
nessie is really just a preparser that generates pike code which is then compiled and run by pike albeit in a manner that the user does not really notice at first that this is happening.
greetings, martin.
--
cooperative communication with sTeam - caudium, pike, roxen and unix
offering: programming, training and administration - anywhere in the world
--
pike programmer travelling and working in europe open-steam.org
unix system- bahai.or.at iaeste.(tuwien.ac|or).at
administrator (caudium|gotpike).org is.chon.org
Martin Bähr http://www.iaeste.or.at/~mbaehr/

Comments
Post new comment